[DRAFT] Add universal dev base image for zero-build dev setup#609
Draft
[DRAFT] Add universal dev base image for zero-build dev setup#609
Conversation
Pre-builds a universal base image (spryker/dev-base:phpX.Y-nodeZ) with all common components (PHP runtime, Node.js, Linux packages, Blackfire client, supervisor, spryker user setup, SSH relay). Projects opt in via deploy.yml `docker.dev-base-image.enabled: true`. When enabled, the SDK pulls the pre-built image instead of running the 6-step docker build chain. Project-specific config (PHP extensions, PHP ini, SSL certs, UID matching) moves to runtime via an entrypoint script and volume mounts. The existing build chain is fully preserved as the default when the flag is not set.
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
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.
Pre-builds a universal base image (spryker/dev-base:phpX.Y-nodeZ) with all common components (PHP runtime, Node.js, Linux packages, Blackfire client, supervisor, spryker user setup, SSH relay).
Projects opt in via deploy.yml
docker.dev-base-image.enabled: true. When enabled, the SDK pulls the pre-built image instead of running the 6-step docker build chain. Project-specific config (PHP extensions, PHP ini, SSL certs, UID matching) moves to runtime via an entrypoint script and volume mounts.The existing build chain is fully preserved as the default when the flag is not set.
Description
Summary
cli-basic, application-local, application-development, debug) into a single pull-able image
PHP ini, SSL certs, UID matching) handled at container start via an entrypoint script and volume mounts
Motivation
Every Spryker project runs 6+ sequential docker build steps during bootstrap in dev (mount) mode, even though most of what's built is identical across projects: PHP runtime, Node.js, Linux packages, Blackfire client, spryker user setup, SSH relay, supervisor, etc. The only project-specific parts are env vars, PHP extension selection, PHP ini overrides, SSL certs, and UID matching.
This feature eliminates that redundant build time by pre-baking the common components into a universal image that projects simply pull.
How it works
Opt-in via deploy.yml
What stays the same
Change log
mvof PHP extension.inifiles in DockerfileSPRYKER_PHP_EXTENSIONSenv var, copies.inifilesusermod -u $UID sprykerinmount/application/DockerfileSPRYKER_USER_UIDenv varCOPY ca.crt && update-ca-certificatesinapplication-local/Dockerfileupdate-ca-certificatesCOPYin DockerfileNew files
Modified files
Checklist
Test plan