-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cloudsql build scripts. #4
Conversation
@@ -0,0 +1,4 @@ | |||
FROM scratch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scratch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cloudsql proxy is a statically-built binary. It doesn't need anything else (other than the root x509 certs for TLS connections, but those already reside on the VM are are mapped into the container).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added a second commit to make sure we statically build it :)
$ docker run f013
2016/01/11 23:59:23 No authentication method available! When not running on Google Compute Engine, provide the -credential_file flag.
R: @andrewsg |
go get github.com/GoogleCloudPlatform/cloudsql-proxy/... | ||
echo "Building in $DEST" | ||
|
||
go build -o cloud_sql_proxy github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need a few more commands for the output binary to be in the correct format. This is what I used in the past:
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o cloud_sql_proxy
github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be there in the second commit. Thanks!
LGTM |
No description provided.