Skip to content

Conversation

lavarou
Copy link
Member

@lavarou lavarou commented Oct 16, 2024

  1. 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).

  2. Simplify composer and go install.

  3. Fix devenv service image build for PHPs 7.2 and 7.3.

  4. Apply Dockerfile best practices

@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Oct 16, 2024

Test Suite Status Result
Multiverse 7/7 passing
SOAK 52/56 passing

@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.54%. Comparing base (727812d) to head (739b7f6).

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           
Flag Coverage Δ
agent-for-php-7.2 78.55% <ø> (ø)
agent-for-php-7.3 78.57% <ø> (ø)
agent-for-php-7.4 78.27% <ø> (ø)
agent-for-php-8.0 78.29% <ø> (ø)
agent-for-php-8.1 78.28% <ø> (ø)
agent-for-php-8.2 77.87% <ø> (ø)
agent-for-php-8.3 77.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.
@lavarou lavarou force-pushed the chore/agent-devenv branch from 86b1ab9 to a2bea58 Compare October 28, 2024 18:28
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.
@lavarou lavarou self-assigned this Oct 28, 2024
@lavarou lavarou marked this pull request as ready for review October 28, 2024 22:15
@lavarou lavarou requested a review from ZNeumann October 28, 2024 22:16
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
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.
@lavarou lavarou merged commit 467f79e into dev Nov 12, 2024
55 checks passed
@lavarou lavarou deleted the chore/agent-devenv branch November 12, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants