Skip to content

Instantly share code, notes, and snippets.

@jdecode
Last active April 22, 2020 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdecode/5c4fd5050e4f929fd1816bf35291e989 to your computer and use it in GitHub Desktop.
Save jdecode/5c4fd5050e4f929fd1816bf35291e989 to your computer and use it in GitHub Desktop.
Run composer and other commands inside Docker using docker-compose
  1. Install composer require in docker-compose e.g. Add Sentry like this:

docker-compose run kode composer require sentry/sdk:2.1.0

  1. Run shell commands e.g. "bake" commands in CakePHP shell could be run like this:

docker-compose run kode bin/cake bake all

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