Skip to content

Commit

Permalink
Merge pull request #295 from piotrkwiecinski/copytocontainer
Browse files Browse the repository at this point in the history
Handle nested files in copytocontainer script
  • Loading branch information
markshust committed Aug 27, 2020
2 parents cbc6183 + e0e7e15 commit 30b6303
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compose/bin/copytocontainer
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ if [ "$1" == "--all" ]; then
bin/fixowns
bin/fixperms
else
docker cp $REAL_SRC/$1 $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/
if [ -f "$REAL_SRC/$1" ]; then
docker cp $REAL_SRC/$1 $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/$1
else
docker cp $REAL_SRC/$1 $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/$(dirname $1)
fi
echo "Completed copying $1 from host to container"
bin/fixowns $1
bin/fixperms $1
Expand Down

0 comments on commit 30b6303

Please sign in to comment.