-
-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
Description
Is your feature request related to a problem you're facing?
Currently, Dockershrink only supports and works well with the official nodejs base images.
So it works good if your dockerfile says FROM node:22 for eg, but doesn't provide much benefit if you're using a custom base image, which is what a lot of enterprises do.
Describe the solution you'd like
DS should be able to provide optimizations even if the user isn't using the official nodejs image as their base image.
Scope
If a nodejs app's Dockerfile is using a custom base image:
- DS should assume that this base image already contains NodeJS.
It is possible that it doesn't and the user is installing nodejs separately in the dockerfile, but that is out of scope of this issue. - The rule
final-stage-slim-baseimageshould only check for and enforce lightweight base image if the current base image being used in dockerfile is a community-provided one (eg-node:22, distroless/nodejs, chainguard nodejs, etc).
In case of a custom docker image, this rule should not run. Scanning custom base image is out of scope for this issue. - In case DS adds another stage to the Dockerfile, the new stage must use the same custom base image.
Reactions are currently unavailable