Docker > Dockerfile > add "WORKDIR" (instead of "working_dir" in docker-compose.yml)

This commit is contained in:
Meritoo
2018-06-14 21:35:50 +02:00
parent 3726a26e47
commit 4c534394d9
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,6 @@ services:
php-cli: php-cli:
image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli
container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-php-cli container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-php-cli
working_dir: /project
entrypoint: php entrypoint: php
command: -S 0.0.0.0:9999 command: -S 0.0.0.0:9999
build: build:
@@ -16,7 +15,6 @@ services:
composer: composer:
image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli
container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-composer container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-composer
working_dir: /project
entrypoint: composer entrypoint: composer
volumes: volumes:
- .:/project - .:/project

View File

@@ -127,3 +127,5 @@ RUN sed -i 's/^# export/export/g; \
# Use project-related binaries globally # Use project-related binaries globally
# #
ENV PATH="/project/vendor/bin:${PATH}" ENV PATH="/project/vendor/bin:${PATH}"
WORKDIR /project