Last active
September 7, 2015 16:59
-
-
Save ybogdanov/e82a52e0b8a5521c881c to your computer and use it in GitHub Desktop.
Example Rockerfile with multiple FROM instructions, see https://github.com/grammarly/rocker
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
# Build stage: will start from google/golang:1.4 and compile app.go | |
FROM google/golang:1.4 | |
ADD . /src | |
WORKDIR /src | |
# Will result in putting app.o to the working directory /src | |
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -v -o app.o app.go | |
# Will make app.o available in the following FROM | |
EXPORT app.o | |
# Describe "run" image based on "busybox", weights 4.3MB | |
FROM busybox | |
# Will import recently built app.o into /bin/app | |
IMPORT app.o /bin/app | |
CMD ["/bin/app"] | |
TAG app:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment