-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
area/builderBuildBuild
Description
Follow-up proposal to #32063
Take the example from #32063 .
FROM ubuntu AS build-env
RUN apt-get install make
ADD . /src
RUN cd /src && make
FROM busybox
COPY --from=build-env /src/build/app /usr/local/bin/app
EXPOSE 80
ENTRYPOINT /usr/local/bin/app
When this Dockerfile is executed the last image is built and tagged. The first image is built but remains untagged and is reused for the cache. There may be cases where you want to build and tag build-env instead. In this case, it should be possible to specify the target you are interested in docker build --target=build-env ..
It the builder has finished building the block with name build-env it can stop and finish processing. Later we can make this smarter, analyze what blocks depend on each other and skip the ones that don't need to be processed.
@tiborvass @dmcgowan @simonferquel @dnephin @vdemeester @duglin
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/builderBuildBuild