Skip to content

Instantly share code, notes, and snippets.

@oliverlundquist
Created October 3, 2017 08:52
Show Gist options
  • Save oliverlundquist/8315aca434bd30bb46b0beebdeffc90d to your computer and use it in GitHub Desktop.
Save oliverlundquist/8315aca434bd30bb46b0beebdeffc90d to your computer and use it in GitHub Desktop.
Composer in Docker
# Create auth.json file
# mkdir -p ~/.composer && \
# echo '{}' > ~/.composer/auth.json && \
# docker run -it --rm -v ~/.composer/auth.json:/tmp/auth.json composer config -g github-oauth.github.com mysecrettoken && \
# chmod 600 ~/.composer/auth.json
# Run with auth.json
# alias composer='docker pull composer:latest && docker run -it --rm -v $PWD:/app -v ~/.composer/auth.json:/root/.composer/auth.json composer'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment