Created
May 6, 2014 15:26
-
-
Save daniel-garcia/fb4831f4d52b761356d4 to your computer and use it in GitHub Desktop.
recreate issue when commiting running container that has a file based bind mount
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
#!/usr/bin/env bash | |
set -e | |
docker pull ubuntu:latest | |
touch somefile.txt | |
WD=`pwd` | |
echo "about to run docker image in the background" | |
CONTAINERID=`docker run -d -v $WD/somefile.txt:/somefile.txt ubuntu sleep 100` | |
echo "giving some time for container to start" | |
sleep 3 | |
echo "about to commit $CONTAINERID to image bindErrImage" | |
docker commit $CONTAINERID binderrimg | |
echo "about to create new container with bindErrImage" | |
docker run binderrimg hostname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment