Created
April 28, 2017 21:02
-
-
Save mpapierski/a9cc236b1fe11416720d5c03368297c4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if [ x$INCEPTION != 'x' ]; then | |
echo "We need to go deeper..." | |
echo "This was built inside docker container" > /build/hello.txt | |
exit 0 | |
fi | |
# For storing .deb | |
VOLUME="$(docker volume create)" | |
echo "Volume is $VOLUME" | |
docker run \ | |
--rm \ | |
-e INCEPTION=true \ | |
-v `pwd`:/code:ro \ | |
-v $VOLUME:/build \ | |
-w /code \ | |
apiaryio/emcc:1.37 \ | |
bash -c './.ci/build-emscripten.sh' | |
echo "Creating temporary container" | |
CONTAINER="$(docker run -d -v $VOLUME:/build busybox)" | |
echo "Copying files from temporary container $CONTAINER" | |
docker cp $CONTAINER:/build/hello.txt ./hello.txt | |
echo "Remove container $CONTAINER" | |
docker rm $CONTAINER | |
echo "Remove volume $VOLUME" | |
docker volume rm $VOLUME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment