Skip to content

Is it possible to merge two base images in Docker? #4855

Answered by tonistiigi
Nefcanto asked this question in Q&A
Discussion options

You must be logged in to vote

To merge layers from both images together you can do

FROM mcr.microsoft.com/vscode/devcontainers/dotnet:8.0-bookworm-slim
COPY --link --from=node:lts-bookworm-slim / /

If that resulting image works is another question. Probably not as node:lts-bookworm-slim is already a full image, not just the node package that you probably want on top of you base image instead.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by profnandaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #4850 on April 17, 2024 17:33.