GoogleContainerTools / kaniko

Build Container Images In Kubernetes
Apache License 2.0
14.67k stars 1.42k forks source link

[Feature] Support multi context builds #2728

Open Neirda24 opened 1 year ago

Neirda24 commented 1 year ago

Hi.

Actual behavior Kaniko does not seem to support either multiple build contexts nor named ones.

Expected behavior See this article https://www.docker.com/blog/dockerfiles-now-support-multiple-build-contexts/

that allows syntax such as COPY --from=some_context where some_context is set during docker build

To Reproduce Run kaniko

Additional Information

FROM scratch

COPY . .
COPY --from=my_context . /other-directory
$ docker build --build-context my_context=/some/directory /some/other/directory

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
  • - [x]
Please check if the build works in docker but not in kaniko
  • - [x]
Please check if this error is seen when you use --cache flag
  • - [ ]
Please check if your dockerfile is a multistage dockerfile
  • - [ ]
igor-sadchenko commented 3 months ago

Any updates here? @aaron-prindle @JeromeJu