Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply the Docker builder pattern (multistage build) for the PHP Dockerfile #63

Merged
merged 3 commits into from Oct 31, 2018

Conversation

JavierCane
Copy link
Member

Context: #61

Important: We've moved the PHP Dockerfile to the root directory. Why: Previously we were not able to apply the multistage approach because the PHP Dockerfile was in a subdirectory, so the COPY composer.json composer.lock /app/ instruction could not find these files because they were not in the current Dockerfile context. Moving it to the root directory allow us to have the composer.json and composer.lock in the Dockerfile context

Useful for test environment arranger trying to create it inside the Docker container where it already exists. Ideal solution: Remove the environment arranger (further PR)
…kerfile

* Move the PHP Dockerfile to the root directory. Why: Previously we were not able to apply the multistage approach because the PHP `Dockerfile` was in a subdirectory, so the `COPY composer.json composer.lock /app/` instruction could not find these files because they were not in the current `Dockerfile` context. Moving it to the root directory allow us to have the `composer.json` and `composer.lock` in the `Dockerfile` context
@@ -15,7 +15,8 @@ services:
php:
container_name: codelytv-cqrs_ddd_php_example-php
build:
context: etc/infrastructure/php
context: .
dockerfile: Dockerfile-php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name it Dockerfile since it's our server (and would be the unique to be in the root)

@JavierCane JavierCane merged commit 89e7dc1 into master Oct 31, 2018
@JavierCane JavierCane deleted the docker-php-multistage branch October 31, 2018 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants