Last active
January 3, 2018 09:22
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
services: | |
composer: | |
build: | |
context: . | |
dockerfile: composer.Dockerfile | |
volumes: | |
- ./:/app | |
working_dir: /app | |
tty: true | |
command: sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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