Created
March 4, 2019 05:17
-
-
Save snobutaka/7b47acea1cd85846eeedac51a5677673 to your computer and use it in GitHub Desktop.
Docker Multi Stage Build Example
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
FROM ubuntu:latest AS cow-builder | |
WORKDIR /tmp | |
RUN apt-get update && apt-get install -y cowsay | |
RUN /usr/games/cowsay 'Hello world!' > ./cow.txt | |
FROM ubuntu:latest | |
COPY --from=cow-builder /tmp/cow.txt . | |
CMD ["cat", "cow.txt"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment