Skip to content

Instantly share code, notes, and snippets.

@calvinchengx
Created November 7, 2015 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calvinchengx/66c3ef5c13250b1192cc to your computer and use it in GitHub Desktop.
Save calvinchengx/66c3ef5c13250b1192cc to your computer and use it in GitHub Desktop.
FROM scratch
ADD certs /etc/ssl/certs
ADD main /
CMD ["/main"]
#!/usr/bin/env bash
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
eval "$(docker-machine env dev)" && docker-machine scp -r dev:/etc/ssl/certs/ certs
eval "$(docker-machine env dev)" && docker build -t golangdocker -f Dockerfile .
rm -rf certs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment