feat: add node image variant#143
Closed
Philip Reinken (philipreinken) wants to merge 6 commits into
Closed
Conversation
Resolves: #138
Philip Reinken (philipreinken)
force-pushed
the
node-20250828-1452
branch
from
August 29, 2025 15:27
1636da2 to
714c799
Compare
Contributor
Author
|
There's a |
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.
Resolves: #138
With this PR, we get another image variant that includes
nodeas well.Since the use of
COPYis a bit unusual, I'll try to explain the direction I took here in more detail.We need to support:
v22andv24(to support various shopware versions)musl(due to alpine base image)arm64processor archSo just calling
apk add nodejsis not an option, as the node versions available to us would be dependant on the alpine repositories referenced in thephp:x-fpm-alpinevariant we build upon. For example, inphp:8.4-fpm-alpine, we can easily get nodev22, but notv24.Even when referencing non-default repos,
v24is not available inedgeor any other repo AFAICT, link.As a first possible solution, there are unofficial builds which work on alpine with its
musllibc variant. However, these are available forx86_64only. Tooling likenornvmrelies on those builds as well, so is of no help here.Looking at the contents of an exemplary pre-built binary package:
Release contents
...the same binaries/library files are present in the official nodejs-alpine container image, which is also available in all required processor architectures.
Compiling node is another alternative I'm currently looking into, but considering the process required, I believe a few
COPYinstructions might be easier to maintain.That said, I'd be happy to hear more ideas on this.
TODO: