Last active
November 15, 2016 14:32
-
-
Save kgizdov/d2cc744d4a9ea1d80317bcbfefe01754 to your computer and use it in GitHub Desktop.
Update docker image
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 | |
IMAGENAME=$1 | |
LOCALFILE=$2 | |
DESTINATION=$3 | |
DIR=$(dirname $3) | |
docker run -i ${IMAGENAME} /bin/bash -c 'mkdir -p "$1" && cat > "$2"' -- ${DIR} ${DESTINATION} < ${LOCALFILE} | |
docker commit `docker ps -l -q` ${IMAGENAME}:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment