Skip to content

Instantly share code, notes, and snippets.

@fhuitelec
Last active January 3, 2018 09:22
Show Gist options
  • Save fhuitelec/67a83907d9a108e4836581aa9dec72a7 to your computer and use it in GitHub Desktop.
Save fhuitelec/67a83907d9a108e4836581aa9dec72a7 to your computer and use it in GitHub Desktop.
[SF Flex docker container] Run a dedicated composer container with Flex #docker #symfony #flex #php
version: '3.1'
services:
composer:
build:
context: .
dockerfile: composer.Dockerfile
volumes:
- ./:/app
working_dir: /app
tty: true
command: sh
FROM php:7.1-alpine
RUN apk --update add git
RUN wget https://getcomposer.org/composer.phar -P /tmp
RUN chmod +x /tmp/composer.phar
RUN mv /tmp/composer.phar /usr/local/bin/composer
RUN composer global require hirak/prestissimo
RUN composer global require symfony/flex
export COMPOSER_COMPOSE_EXEC = docker-compose -f composer.docker-compose.yaml
.PHONY: composer
composer:
$(COMPOSER_COMPOSE_EXEC) run --rm composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment