Skip to content

Call build scripts in the same layer they're needed#143

Merged
brusch merged 3 commits intopimcore:3.xfrom
maxjuergens:build-scripts-layer-fix
Jul 5, 2023
Merged

Call build scripts in the same layer they're needed#143
brusch merged 3 commits intopimcore:3.xfrom
maxjuergens:build-scripts-layer-fix

Conversation

@maxjuergens
Copy link
Copy Markdown
Contributor

Each RUN instruction creates a new layer, so the removed stuff will still remain in the previous layer. This leads to huge image sizes.

Before: 3.61GB, max. variant
After: 2.78GB, max. variant

The code style was slightly changed as well, in order to sort multi-line arguments.
See: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#sort-multi-line-arguments

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 29, 2023

CLA assistant check
All committers have signed the CLA.

Each `RUN` instruction creates a new layer, so the removed stuff
will still remain in the previous layer. This leads to huge image
sizes.

Before: 3.61GB, max. variant
After: 2.78GB, max. variant

The code style was slightly changed as well, in order to sort
multi-line arguments.
See: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#sort-multi-line-arguments
@maxjuergens maxjuergens force-pushed the build-scripts-layer-fix branch from 478f651 to 0a08b9a Compare June 29, 2023 12:48
@brusch brusch added this to the 3.0 milestone Jul 3, 2023
@maxjuergens
Copy link
Copy Markdown
Contributor Author

@brusch, sure, it makes sense to merge the mentioned RUN instructions (did not want to change too much at once). I've updated the PR.

@maxjuergens
Copy link
Copy Markdown
Contributor Author

@brusch, the Docker Engine used doesn't seem to have version >= 23.0 yet. I've updated the PR and set DOCKER_BUILDKIT in order to enable BuildKit for the tests (the release should be fine, due to buildx).

@brusch brusch merged commit 54312dc into pimcore:3.x Jul 5, 2023
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.

5 participants