Skip to content

Instantly share code, notes, and snippets.

@matriphe
Last active March 5, 2023 03:41
Show Gist options
  • Save matriphe/4dd57124beded953c7d303f16b5ca9cb to your computer and use it in GitHub Desktop.
Save matriphe/4dd57124beded953c7d303f16b5ca9cb to your computer and use it in GitHub Desktop.
Composer shell alias to run Composer Docker
#!/bin/bash
docker run \
--interactive \
--rm \
--user $(id -u):$(id -g) \
--volume ~/.composer:/tmp \
--volume /etc/passwd:/etc/passwd:ro \
--volume /etc/group:/etc/group:ro \
--volume $(pwd):/app \
composer "$@"
@matriphe
Copy link
Author

matriphe commented Dec 6, 2018

make sure the composer docker image is pulled and run correctly. put it in the /usr/local/bin/composer then just use composer command as usual.

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