Skip to content

Instantly share code, notes, and snippets.

@markshust
Created August 30, 2018 02:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markshust/15efb29aa5eebf8adae402af18b2e674 to your computer and use it in GitHub Desktop.
Save markshust/15efb29aa5eebf8adae402af18b2e674 to your computer and use it in GitHub Desktop.
copy folder from docker compose (named phpfpm) to local host
#!/bin/bash
[ -z "$1" ] && echo "Please specify a folder to copy (ex. vendor)" && exit
docker cp $(docker-compose ps|grep phpfpm|awk '{print $1}'):/var/www/html/$1 src/
@markshust
Copy link
Author

usage is ./copyfolder.sh vendor to copy vendor folder from /var/www/html/vendor on the container to src/vendor on the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment