Skip to content

Instantly share code, notes, and snippets.

@mpapierski
Created April 28, 2017 21:02
Show Gist options
  • Save mpapierski/a9cc236b1fe11416720d5c03368297c4 to your computer and use it in GitHub Desktop.
Save mpapierski/a9cc236b1fe11416720d5c03368297c4 to your computer and use it in GitHub Desktop.
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