Skip to content

Update Dockerfile build to use multi-stage build with container-features - #13

Merged
Christof Marti (chrmarti) merged 18 commits into
mainfrom
stuartleeks/container-features-multistage-dockerfile
May 18, 2022
Merged

Christof Marti (chrmarti) merged 18 commits into
mainfrom
stuartleeks/container-features-multistage-dockerfile

Conversation

@stuartleeks

@stuartleeks Stuart Leeks (stuartleeks) commented May 12, 2022 •

Copy link
Copy Markdown
Collaborator

PR to update the build for Dockerfile-based dev containers to use a single multi-stage build (part of #10 )

Adds a new getExtendImageBuildInfo function that creates the Dockerfile content for extending the base to add container-features. This is called from the existing extendImage for image-based containers, and from buildAndExtendImage to build Dockerfile-based dev containers in a single, multi-stage build step

@stuartleeks
Stuart Leeks (stuartleeks) force-pushed the stuartleeks/container-features-multistage-dockerfile branch 7 times, most recently from 37a2950 to 904df49 Compare May 17, 2022 08:15
@stuartleeks Stuart Leeks (stuartleeks) changed the title [WIP] Update Dockerfile build to use multi-stage build with container-features May 17, 2022
@stuartleeks
Stuart Leeks (stuartleeks) marked this pull request as ready for review May 17, 2022 09:11
Comment thread yarn.lock Resolved
@stuartleeks
Stuart Leeks (stuartleeks) force-pushed the stuartleeks/container-features-multistage-dockerfile branch from e16399b to d30fcfe Compare May 17, 2022 13:05
Comment thread src/spec-node/singleContainer.ts Resolved
Comment thread src/spec-node/singleContainer.ts Resolved
@stuartleeks
Stuart Leeks (stuartleeks) force-pushed the stuartleeks/container-features-multistage-dockerfile branch 2 times, most recently from fb8bb78 to bc4c3ae Compare May 17, 2022 19:34
@stuartleeks
Stuart Leeks (stuartleeks) force-pushed the stuartleeks/container-features-multistage-dockerfile branch 2 times, most recently from af7f255 to 5e94965 Compare May 18, 2022 09:40
useBuildKit skips the temporary image for  container-features content
and uses a build-context to pass the content instead
Add BUILDKIT_INLINE_CACHE so that pushed images contain
cache manifest
When running the build with no TTY (e.g. in CI), running docker build
commands with a PTY triggers the rich output which is hard to read
in logs (and ends up significantly longer than desired)
@stuartleeks
Stuart Leeks (stuartleeks) deleted the stuartleeks/container-features-multistage-dockerfile branch May 18, 2022 10:04
@nvt261991-sys

Copy link
Copy Markdown
1 similar comment
@nvt261991-sys

Copy link
Copy Markdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants