Giter Site home page Giter Site logo

Comments (4)

fiunchinho avatar fiunchinho commented on May 12, 2024 3

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.

JavierCane avatar JavierCane commented on May 12, 2024 2

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.

JavierCane avatar JavierCane commented on May 12, 2024

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.

JavierCane avatar JavierCane commented on May 12, 2024

Issue closed by PR: #63

from php-ddd-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.