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

docker-php-ext-install に -j$(nproc) を付与してパラレルビルドする #984

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

nanasess
Copy link
Contributor

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.63%. Comparing base (f2191bf) to head (b4585ca).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #984   +/-   ##
=======================================
  Coverage   55.63%   55.63%           
=======================================
  Files          75       75           
  Lines        8917     8917           
=======================================
  Hits         4961     4961           
  Misses       3956     3956           
Flag Coverage Δ
tests 55.63% <ø> (ø)

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.

Copy link
Contributor

@seasoftjapan seasoftjapan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

手元環境 (WSL2) で、9秒くらい早くなりました。

適用前

$ time docker build -f Dockerfile-local -t local/ec-cube/ec-cube2-php:${TAG} --pull --build-arg TAG=${TAG} --build-arg XDEBUG
=${XDEBUG} --no-cache .
[+] Building 42.3s (10/10) FINISHED                                                                                                    docker:default
 => [internal] load build definition from Dockerfile-local                                                                                       0.0s
 => => transferring dockerfile: 333B                                                                                                             0.0s
 => [internal] load metadata for ghcr.io/ec-cube/ec-cube2-php:8.1-apache                                                                         0.5s
 => [internal] load .dockerignore                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                  0.0s
 => CACHED [1/6] FROM ghcr.io/ec-cube/ec-cube2-php:8.1-apache@sha256:176444d024095f91625961eecac5fec6a1d086419cde27227e16626d5de2a9d6            0.0s
 => [2/6] RUN apt update                                                                                                                         5.8s
 => [3/6] RUN apt -y install inetutils-ping telnet                                                                                               2.4s
 => [4/6] RUN pecl install xdebug                                                                                                               27.7s
 => [5/6] RUN docker-php-ext-enable xdebug                                                                                                       0.7s
 => [6/6] RUN apt -y install iproute2                                                                                                            4.3s
 => exporting to image                                                                                                                           0.4s
 => => exporting layers                                                                                                                          0.3s
 => => writing image sha256:990b87c7cbff837da60ea5f86c0922557dc2e81fed9d0582ac05bc2801440b48                                                     0.0s
 => => naming to docker.io/local/ec-cube/ec-cube2-php:8.1-apache                                                                                 0.0s

real    0m42.840s
user    0m0.291s
sys     0m0.269s

適用後

$ time docker build -f Dockerfile-local -t local/ec-cube/ec-cube2-php:${TAG} --pull --build-arg TAG=${TAG} --build-arg XDEBUG
=${XDEBUG} --no-cache .
[+] Building 33.6s (10/10) FINISHED                                                                                                    docker:default
 => [internal] load build definition from Dockerfile-local                                                                                       0.0s
 => => transferring dockerfile: 333B                                                                                                             0.0s
 => [internal] load metadata for ghcr.io/ec-cube/ec-cube2-php:8.1-apache                                                                         0.7s
 => [internal] load .dockerignore                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                  0.0s
 => CACHED [1/6] FROM ghcr.io/ec-cube/ec-cube2-php:8.1-apache@sha256:176444d024095f91625961eecac5fec6a1d086419cde27227e16626d5de2a9d6            0.0s
 => [2/6] RUN apt update                                                                                                                         5.6s
 => [3/6] RUN apt -y install inetutils-ping telnet                                                                                               2.2s
 => [4/6] RUN pecl install xdebug                                                                                                               19.5s
 => [5/6] RUN docker-php-ext-enable xdebug                                                                                                       0.6s
 => [6/6] RUN apt -y install iproute2                                                                                                            4.2s
 => exporting to image                                                                                                                           0.4s
 => => exporting layers                                                                                                                          0.3s
 => => writing image sha256:ee75d66540633d855bdfa1cf3e2ad9aac10ce43bce33143c013cec06e80a11e0                                                     0.0s
 => => naming to docker.io/local/ec-cube/ec-cube2-php:8.1-apache                                                                                 0.0s

real    0m33.866s
user    0m0.187s
sys     0m0.200s

https://localhost:4430/ 普通に表示されることを確認。

@nanasess nanasess merged commit 3046c78 into EC-CUBE:master Aug 29, 2024
90 checks passed
@nanasess nanasess deleted the improve/dockerbuild-performance branch August 29, 2024 12:22
@nanasess nanasess added this to the 2.18(仮) milestone Dec 16, 2024
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.

3 participants