Created
September 26, 2019 19:21
-
-
Save joao-fontenele/9bf205e45c9c813716a343eefc1f298e to your computer and use it in GitHub Desktop.
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 | |
# USAGE: ./copy-docker.sh nginx:stable-alpine /etc/nginx/nginx.conf nginx.conf | |
image=$1 | |
src=$2 | |
dest=$3 | |
container_name="copy-docker-temp" | |
docker create -it --name ${container_name} ${image} bash | |
docker cp ${container_name}:${src} $dest | |
docker rm -f ${container_name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment