Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dev-head
Created January 8, 2020 19:29
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 dev-head/530771126dfbcc981092031007437a43 to your computer and use it in GitHub Desktop.
Save dev-head/530771126dfbcc981092031007437a43 to your computer and use it in GitHub Desktop.
Install PHP Dependencies Via Composer and Docker

Install PHP Dependencies Via Composer and Docker

  • Install PHP Compose dependencies locally, assuming current directory has a composer.json file already defined.
  • This will run through the install and save the vendors/ directory in your current working directly.
  • This is useful when you don't have the required php or composer version or just want to ensure you don't muck up your local with any odd requirements.
docker run --rm \
  --volume $(pwd):/var/www \
  --workdir /var/www \
  composer:latest \
  install --ignore-platform-reqs --optimize-autoloader --no-suggest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment