Last active
September 3, 2024 09:47
-
-
Save jonhattan/3deb997a98861d50bf98b7f3ded70110 to your computer and use it in GitHub Desktop.
Bash wrapper to run composer via 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/bash | |
# Place this file in /usr/local/bin/composer and chmod +x | |
docker run --rm \ | |
-u `id -u`:`id -g` \ | |
--volume "${PWD}":/app \ | |
--volume "${COMPOSER_HOME:-$HOME/.composer}":/tmp \ | |
--volume "$SSH_AUTH_SOCK":/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent \ | |
--volume /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts \ | |
--volume /etc/passwd:/etc/passwd:ro \ | |
composer:2 "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment