Created
July 16, 2017 14:18
-
-
Save leolana/52bc6531b1a59ccd8e85e727e99f110c to your computer and use it in GitHub Desktop.
Composer script run docker
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/sh | |
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin | |
echo "Current working directory: '"$(pwd)"'" | |
tty=tty -s && tty=--tty | |
sudo docker run \ | |
$tty \ | |
--interactive \ | |
--rm \ | |
--user $(id -u):$(id -g) \ | |
--volume /etc/passwd:/etc/passwd:ro \ | |
--volume /etc/group:/etc/group:ro \ | |
--volume $(pwd):/app \ | |
composer "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment