Comments (4)
Having a Dockerfile on the root of the project allows potentials developers to just docker build
and docker run
the repository, without having to know where the hell the Dockerfile is. I don't see how adding one more file to the root of the project adds noise.
from php-ddd-example.
First attempt:
FROM composer as builder
COPY composer.json composer.lock /app/
RUN composer install \
--ignore-platform-reqs \
--no-ansi \
--no-autoloader \
--no-interaction \
--no-scripts
COPY . /app/
RUN composer dump-autoload --optimize --classmap-authoritative
FROM php:7.2-fpm-alpine
WORKDIR /app
RUN pecl install amqp apcu xdebug-2.6.0 \
&& docker-php-ext-enable xdebug \
&& docker-php-ext-install pdo pdo_mysql
COPY --from=builder /app /var/www/
COPY php.ini xdebug.ini /usr/local/etc/php/
from php-ddd-example.
PR opened moving the PHP Dockerfile
to the root directory: #63
We can go ahead with this approach by the moment. However, when I was referring to the fact of adding more noise because of adding this Dockerfile
to the root directory, I was thinking about adding different Dockerfile-whatever
in a near future. We could end up having different PHP Dockerfiles depending on the environment (not installing dev dependencies neither generating the dev classes autoload classsmap), so it could end up being a little mess not being able to group these files into a subfolder.
At the end of the day, we're using Docker Compose, so if we want to locate where the Docker magic happens, we would always have the docker-compose.yml
in the root directory 🙂
from php-ddd-example.
Issue closed by PR: #63
from php-ddd-example.
Related Issues (20)
- Error on `make build` HOT 1
- shared classes among bounded context HOT 1
- Error building backoffice_backend_php HOT 4
- Error on make build HOT 5
- Modelos de Dominio con name creators
- Application services expose entities
- The flush method should be outside repositories
- We should not flush an entity
- Unable to create the "cache" directory HOT 3
- Finder application services has different behaviours. Why?
- Windows users HOT 1
- On make build in windows "installed make using choco" HOT 1
- Errror make build new version symfony HOT 2
- Elasticsearch + criteria pattern
- Autenticar usuario implementa Command en lugar de Query
- Database transaction boundary HOT 2
- json_encode() y json_decode() puede lanzar exception desde PHP 7.3
- Deptrac support HOT 1
- Incongruencias entre readme y makefile
- [CONSULTA] Relacion Video y Course
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-ddd-example.