Last active
August 29, 2015 14:02
-
-
Save gdm85/b2ad42eb7752c76ad288 to your computer and use it in GitHub Desktop.
A testcase for bug about inheritance of ONBUILD traits
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
#!/bin/bash | |
set -e | |
mkdir -p base{1,2,3} | |
echo -e "FROM ubuntu:13.10\nRUN echo I am your grand father\nONBUILD RUN echo I am your father" > base1/Dockerfile | |
echo "FROM base1" > base2/Dockerfile | |
echo -e "FROM base2\nEXPOSE 1000" > base3/Dockerfile | |
cd base1 | |
docker build --tag=base1 . | |
echo "--------------------------- Built base1" | |
cd ../base2 | |
docker build --tag=base2 . | |
echo "--------------------------- Built base2" | |
cd ../base3 | |
docker build --tag=base3 . | |
echo "--------------------------- Built base3" | |
docker rmi base{1,2,3} > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment