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

Discussion: Split into 2 images #61

Open
NeroAzure opened this issue Jun 22, 2021 · 2 comments
Open

Discussion: Split into 2 images #61

NeroAzure opened this issue Jun 22, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@NeroAzure
Copy link
Contributor

To split the image into two images (dev and prod) would be beneficial to the size of a production level image. Together with the proposed changes from #60 the prod version of this image would have less than 150MB.

The split would include a multistage dockerfile, where things like nodejs, npm, composer, yarn, etc would only be installed in the dev stage, which can later be used for development and as intermediary stage to build dependencies for the production image.

As names I propose:

  • docker-laravel-dev and/or docker-laravel-development
  • docker-laravel-prod and/or docker-laravel-production
@NeroAzure NeroAzure added the enhancement New feature or request label Jun 22, 2021
@NeroAzure
Copy link
Contributor Author

Maybe we could ommit the docker- prefix, as it is already implied by the fact that it is a docker image. Then the full names would be as follows:

  • development: sourceboat/laravel-dev
  • production optimized: sourceboat/laravel-prod ommitting the suffix: sourceboat/laravel

In my opinion sourceboat/laravel would be quite fitting and most elegant for a production ready image.

@NeroAzure
Copy link
Contributor Author

Other possibility would be to determine the image type by tag:

  • development: sourceboat/laravel:<version>-dev
  • production: sourceboat/laravel:<version>(-prod)

Pro: The image would not be split into two docker repositories
Con: The tag naming could be ambiguous

The naming of the development image would be rather unfortunate in my opinion as the -dev suffix could be interpreted such that it is the pre-realease image for that version. The term builder would not be as fitting, as that one would not only be intended for building the assets, but also for active development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant