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

camelCase stage names do not work #592

Closed
michas2 opened this issue Mar 3, 2019 · 3 comments · Fixed by #839
Closed

camelCase stage names do not work #592

michas2 opened this issue Mar 3, 2019 · 3 comments · Fixed by #839
Labels
area/dockerfile-command For all bugs related to dockerfile file commands priority/p1 Basic need feature compatibility with docker build. we should be working on this next.

Comments

@michas2
Copy link

michas2 commented Mar 3, 2019

Actual behavior
I tried to build an existing multi stage Dockerfile containing stage names in camelCase.
Up to v0.6.0 kaniko failes to copy data from such a stage.
From v0.7.0 to latest it complains about "could not parse reference".
(For details see below.)

Expected behavior
I expected kaniko to build Dockerfiles the same way as docker build does.
Especially if docker build is fine with camelCase names kaniko should also be fine.

To Reproduce

Create a Dockerfile containing a camelcase stage name like this:

from busybox as fooBar
run touch /foo

from busybox as run
copy --from=fooBar /foo .

Try to build it:

$docker run --rm -v $PWD:/workspace gcr.io/kaniko-project/executor:v0.6.0 -d x
[...]
INFO[0007] copy --from=fooBar /foo .                    
error building image: error building stage: lstat /kaniko/fooBar/foo: no such file or directory
$ docker run --rm -v $PWD:/workspace gcr.io/kaniko-project/executor:v0.7.0 -d x
error building image: could not parse reference
INFO[0000] Downloading base image fooBar                
$ docker run --rm -v $PWD:/workspace gcr.io/kaniko-project/executor:v0.9.0 -d x
error building image: could not parse reference
INFO[0000] Downloading base image fooBar      

With docker build it works fine:

$ docker build .
Sending build context to Docker daemon  290.3kB
Step 1/4 : from busybox as fooBar
 ---> d8233ab899d4
Step 2/4 : run touch /foo
 ---> Running in cfc8529c5b0e
Removing intermediate container cfc8529c5b0e
 ---> 284f568e0eef
Step 3/4 : from busybox as run
 ---> d8233ab899d4
Step 4/4 : copy --from=fooBar /foo .
 ---> d8b33ff2822b
Successfully built d8b33ff2822b

Additional Information

  • Dockerfile
    see above
  • Build Context
    No other files beside Dockerfile
  • Kaniko Image (fully qualified with digest)
    see above.
@michas2
Copy link
Author

michas2 commented Mar 3, 2019

BTW, is there a good way to debug situations like "/kaniko/fooBar/foo: no such file or directory"?
(With docker build I have always the chance to docker run the intermediate image, inspect the filesystem and manually run a failing command.)

@skofgar
Copy link

skofgar commented Jul 26, 2019

Were you ever able to get this running?

@dinvlad
Copy link

dinvlad commented Jul 30, 2019

Same issue here. Trying to use wigToBigWig as stage name results in a failure, and renaming it to wig_bigwig worked.

@donmccasland donmccasland added area/dockerfile-command For all bugs related to dockerfile file commands priority/p1 Basic need feature compatibility with docker build. we should be working on this next. labels Sep 24, 2019
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 priority/p1 Basic need feature compatibility with docker build. we should be working on this next.
Projects
None yet
4 participants