Skip to content

Instantly share code, notes, and snippets.

@dmasior
Last active May 5, 2020 13:54
Show Gist options
  • Save dmasior/548e52ed31e1bcb1c195863da3448272 to your computer and use it in GitHub Desktop.
Save dmasior/548e52ed31e1bcb1c195863da3448272 to your computer and use it in GitHub Desktop.
use composer from docker
# Add to .zshrc or .bashrc:
function composer() {
docker run --rm --interactive --tty \
--volume $PWD:/app \
--volume ${COMPOSER_HOME:-$HOME/.composer}:/tmp \
--user $(id -u):$(id -g) \
composer "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment