Last active
August 29, 2015 14:27
-
-
Save unders/eca483da06f19effd2fc to your computer and use it in GitHub Desktop.
A mininal docker file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM gliderlabs/alpine:3.2 # 1. tiny container | |
| MAINTAINER: Anders Törnqvist <...@...com> | |
| RUN apk add --update ca-certificates bash | |
| COPY . go/src/github.com/unders/program # 2. copy your sorce code | |
| RUN apk add go got mercurial \ # 3. add dependencies | |
| && cd /go/src/github.com/unders/program \ | |
| && export GOPATH=/go \ | |
| && go get -t \ # 4. resovel deps | |
| && go test ./... \ # 5. run tests | |
| go build -o /bin/program \ # 6. build | |
| && rm -rf /go \ # 7. remove everything | |
| && apk del --purge go git mercurial | |
| ENTRYPOINT ["/bin/program"] # 8. Launch program | |
| # Video | |
| https://www.youtube.com/watch?v=02w8VjBIDis&list=PL2ntRZ1ySWBeHqlHM8DmvS8axgbrpvF9b&index=5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment