Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A testcase for bug about inheritance of ONBUILD traits
#!/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
You can’t perform that action at this time.