-
Notifications
You must be signed in to change notification settings - Fork 69
chore: enhance dockerized development environment #977
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #977 +/- ##
=======================================
Coverage 78.54% 78.54%
=======================================
Files 196 196
Lines 27103 27103
=======================================
Hits 21287 21287
Misses 5816 5816
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Use `docker compose exec` instead of `docker exec` to make sure that Development Environment commands execute in the correct container, even when multiple Development Environment are running simultanously.
Add an option to control which PHP version is to be used in devenv service via PHP env var passed at the time when dev-shell is started (or any dev-* target is build).
Dockerfile's COPY instruction supports copying from another image. This feature simplifies composer installation significantly because composer can simply be copied over from official image rather than programatically installed.
Install `redis` extension, required by test_redis, in correct version.
Install `argon2` and `libghc-argon2-dev` for all PHPs but don't install `python-dev-is-python3` for PHP 7.2 where the debian version is 10 buster.
86b1ab9
to
a2bea58
Compare
Dockerfile's COPY instruction supports copying from another image. This feature simplifies golang installation significantly because golang can simply be copied over from official image rather than programatically installed. This ensures that the latest version of go for the correct platform will always be installed.
Always combine `RUN apt-get` update with `apt-get install` in the same `RUN` statement. Using `apt-get update` alone in a `RUN` statement causes caching issues and subsequent `apt-get install` instructions to fail. See https://docs.docker.com/build/building/best-practices/#apt-get
'apt-get' install should use '--no-install-recommends' to avoid installing extra or unnecessary packages just because they might be nice to have. When installing extra or unnecessary packages is avoided, the images have reduced complexity, reduced dependencies, reduced file sizes, and reduced build times. See https://docs.docker.com/build/building/best-practices/#dont-install-unnecessary-packages
Organize list of installed packages by removing duplicates, grouping packages and sorting them to make maintenance easier. See https://docs.docker.com/build/building/best-practices/#dont-install-unnecessary-packages and https://docs.docker.com/build/building/best-practices/#sort-multi-line-arguments
More recent docker compose requires explicit value for `--pull` (default is no longer assumed).
The top-level `version` property is defined by the Compose Specification for backward compatibility. It is only informative and using it causes a warning message saying that it is obsolete.
bduranleau-nr
approved these changes
Nov 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an option to control which PHP version is to be used in devenv service
via PHP env var passed at the time when dev-shell is started (or any dev-*
target is build).
Simplify
composer
andgo
install.Fix
devenv
service image build for PHPs 7.2 and 7.3.Apply
Dockerfile
best practices