Created
April 20, 2016 16:22
-
-
Save pmbauer/fd8d48cad9f48ed7c7d75fe643e40e7e to your computer and use it in GitHub Desktop.
This file contains 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
# switches and options: | |
# --rm : remove volume | |
# -v : volume mount build folder | |
# -w : set work area to build folder | |
# /bin/sh : build script | |
docker run --rm \ | |
-v $(pwd):/go/src/github.com/udacity/my-awesome \ | |
-w /go/src/github.com/udacity/my-awesome \ | |
golang:1.5-alpine \ | |
/bin/sh -c 'apk add --update git; go get; go build -o target/my-awesome .' | |
docker build -t udacity/my-awesome:1.0 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment