Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support --parents flag for COPY #3165

Open
colindean opened this issue May 15, 2024 · 0 comments
Open

Feature request: support --parents flag for COPY #3165

colindean opened this issue May 15, 2024 · 0 comments
Labels
area/dockerfile-command For all bugs related to dockerfile file commands cmd/copy feat/docker-syntax kind/feature-request priority/p1 Basic need feature compatibility with docker build. we should be working on this next. works-with-docker

Comments

@colindean
Copy link

Using Kaniko version v1.22.0, when I attempt to build this Dockerfile

# syntax=docker/dockerfile:1.7-labs
FROM scratch

# the [t] here conditionally copies version.txt in if it exists
COPY --parents alpine/ conda/ debian/ python/ security.txt version.tx[t] /

it fails:

error building image: parsing dockerfile: dockerfile parse error on line 5: unknown flag: parents

I reckon Kaniko doesn't yet support the 1.7-labs Dockerfile specification.

Workaround seems to be a more verbose but just as valid end result:

FROM scratch

COPY alpine/ /alpine/
COPY conda/ /conda/
COPY debian/ /debian/
COPY python/ /python/
# the [t] here conditionally copies version.txt in if it exists
COPY security.txt version.tx[t] /

Related issues

@JeromeJu JeromeJu added kind/feature-request priority/p1 Basic need feature compatibility with docker build. we should be working on this next. works-with-docker cmd/copy feat/docker-syntax area/dockerfile-command For all bugs related to dockerfile file commands labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dockerfile-command For all bugs related to dockerfile file commands cmd/copy feat/docker-syntax kind/feature-request priority/p1 Basic need feature compatibility with docker build. we should be working on this next. works-with-docker
Projects
None yet
Development

No branches or pull requests

2 participants