Skip to content

Update Dockerfile.base to use ghcr.io/shopware/docker-dev as base image#1174

Merged
Soner (shyim) merged 1 commit into
mainfrom
update-docker-base-image
Jul 9, 2026
Merged

Update Dockerfile.base to use ghcr.io/shopware/docker-dev as base image#1174
Soner (shyim) merged 1 commit into
mainfrom
update-docker-base-image

Conversation

@shyim

Copy link
Copy Markdown
Member

Summary

Updates Dockerfile.base to use ghcr.io/shopware/docker-dev:php${PHP_VERSION}-node${NODE_VERSION}-caddy as the base image instead of building from scratch.

Changes

  • ✅ Switch to ghcr.io/shopware/docker-dev as base image
  • ✅ Make PHP and Node versions configurable via build args (PHP_VERSION, NODE_VERSION)
  • ✅ Add bun installation from oven/bun:alpine
  • ✅ Make PHP memory_limit configurable via PHP_MEMORY_LIMIT environment variable
  • ✅ Switch to root user for package installation, then back to www-data
  • ✅ Simplify Dockerfile by leveraging pre-installed packages in base image

Benefits

  • Smaller and simpler Dockerfile - No need to install PHP extensions or Node.js from scratch
  • Better maintenance - Base image is maintained separately with latest PHP/Node versions
  • Configurable - Can build for different PHP versions using build args
  • Environment variable support - PHP memory_limit can be configured at runtime

Testing

  • ✅ Built and tested locally with PHP_MEMORY_LIMIT=1G
  • ✅ Verified PHP 8.3.31 is working
  • ✅ Verified Node.js v24.16.0 is working
  • ✅ Verified Bun 1.3.14 is working
  • ✅ Verified memory_limit is configurable via environment variable

Breaking Changes

None - The image should be backward compatible. The build pipeline will continue to work with the matrix strategy for multiple PHP versions.

- Switch to ghcr.io/shopware/docker-dev:php${PHP_VERSION}-node${NODE_VERSION}-caddy as base image
- Make PHP and Node versions configurable via build args
- Add bun installation from oven/bun:alpine
- Make PHP memory_limit configurable via PHP_MEMORY_LIMIT env var
- Switch to root user for package installation, then back to www-data
- Simplify Dockerfile by leveraging pre-installed packages in base image
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.35%. Comparing base (e441e13) to head (15b1555).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1174   +/-   ##
=======================================
  Coverage   47.35%   47.35%           
=======================================
  Files         231      231           
  Lines       16512    16512           
=======================================
  Hits         7819     7819           
  Misses       8693     8693           
Flag Coverage Δ
go-test 47.35% <ø> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shyim Soner (shyim) merged commit e8f7fe3 into main Jul 9, 2026
18 checks passed
@shyim Soner (shyim) deleted the update-docker-base-image branch July 9, 2026 08:33
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