Skip to content

Instantly share code, notes, and snippets.

@BenHizak
Last active September 16, 2019 11:36
Show Gist options
  • Save BenHizak/a792064af4dc49db07876815439aabbf to your computer and use it in GitHub Desktop.
Save BenHizak/a792064af4dc49db07876815439aabbf to your computer and use it in GitHub Desktop.
Kaniko capital letter
#!/bin/bash
# the following build fails but should pass
gcloud builds submit --config=uppercase.yml | tee uppercase.log
# the following build should pass
gcloud builds submit --config=lowercase.yml | tee lowercase.log
# the name 'Library' causes a problem. but 'library' (lowercase) works fine
FROM python:3.7.2 AS library
FROM library
RUN echo "another line"
# the name 'Library' causes a problem. but 'library' (lowercase) works fine
FROM python:3.7.2 AS Library
FROM Library
RUN echo "another line"
--------------------------------- REMOTE BUILD OUTPUT ----------------------------------
starting build "19c521ec-ca79-4940-a896-fcd48f9e7ac8"
FETCHSOURCE
Fetching storage object: gs://my-project_cloudbuild/source/1568633260.29-77d992c672ea49c290cb81b6ff662509.tgz#1568633259466313
Copying gs://my-project_cloudbuild/source/1568633260.29-77d992c672ea49c290cb81b6ff662509.tgz#1568633259466313...
/ [0 files][ 0.0 B/ 1.3 KiB]
/ [1 files][ 1.3 KiB/ 1.3 KiB]
Operation completed over 1 objects/1.3 KiB.
BUILD
Already have image (with digest): gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81
INFO[0000] Resolved base name python:3.7.2 to python:3.7.2
INFO[0000] Resolved base name library to library
INFO[0000] Resolved base name python:3.7.2 to python:3.7.2
INFO[0000] Resolved base name library to library
INFO[0000] Downloading base image python:3.7.2
INFO[0000] Error while retrieving image from cache: getting file info: stat /cache/sha256:9db2a731d3c7970453d37f5f92708ffd1255d12a76517fb24f944ca3d4f84f8e: no such file or directory
INFO[0000] Downloading base image python:3.7.2
INFO[0001] Built cross stage deps: map[]
INFO[0001] Downloading base image python:3.7.2
INFO[0001] Error while retrieving image from cache: getting file info: stat /cache/sha256:9db2a731d3c7970453d37f5f92708ffd1255d12a76517fb24f944ca3d4f84f8e: no such file or directory
INFO[0001] Downloading base image python:3.7.2
INFO[0001] Skipping unpacking as no commands require it.
INFO[0001] Taking snapshot of full filesystem...
INFO[0001] Storing source image from stage 0 at path /kaniko/stages/0
INFO[0004] Deleting filesystem...
INFO[0004] Base image from previous stage 0 found, using saved tar at path /kaniko/stages/0
INFO[0005] Unpacking rootfs as cmd RUN echo "another line" requires it.
INFO[0018] Taking snapshot of full filesystem...
INFO[0030] RUN echo "another line"
INFO[0030] cmd: /bin/sh
INFO[0030] args: [-c echo "another line"]
another line
INFO[0030] Taking snapshot of full filesystem...
INFO[0034] No files were changed, appending empty layer to config. No layer added to image.
PUSH
DONE
----------------------------------------------------------------------------------------
ID CREATE_TIME DURATION SOURCE IMAGES STATUS
19c521ec-ca79-4940-a896-fcd48f9e7ac8 2019-09-16T11:27:39+00:00 44S gs://my-project_cloudbuild/source/1568633260.29-77d992c672ea49c290cb81b6ff662509.tgz - SUCCESS
steps:
- name: gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81
args:
- --dockerfile=Dockerfile-lowercase
- --destination=gcr.io/my-project/kaniko_fail_example_capital # note: change 'your-project' to your google cloud
--------------------------------- REMOTE BUILD OUTPUT ----------------------------------
starting build "7e1de778-143d-40fe-9e21-683c51fde205"
FETCHSOURCE
Fetching storage object: gs://my-project_cloudbuild/source/1568633246.06-66fdd267ca2f4b9e8ebd1f61365e0b51.tgz#1568633245319762
Copying gs://my-project_cloudbuild/source/1568633246.06-66fdd267ca2f4b9e8ebd1f61365e0b51.tgz#1568633245319762...
/ [0 files][ 0.0 B/ 800.0 B]
/ [1 files][ 800.0 B/ 800.0 B]
Operation completed over 1 objects/800.0 B.
BUILD
Already have image (with digest): gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81
INFO[0000] Resolved base name python:3.7.2 to python:3.7.2
INFO[0000] Resolved base name Library to Library
INFO[0000] Resolved base name python:3.7.2 to python:3.7.2
INFO[0000] Resolved base name Library to Library
INFO[0000] Downloading base image python:3.7.2
INFO[0001] Error while retrieving image from cache: getting file info: stat /cache/sha256:9db2a731d3c7970453d37f5f92708ffd1255d12a76517fb24f944ca3d4f84f8e: no such file or directory
INFO[0001] Downloading base image python:3.7.2
INFO[0002] Error while retrieving image from cache: could not parse reference
INFO[0002] Downloading base image Library
error building image: could not parse reference
ERROR
ERROR: build step 0 "gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81" failed: exit status 1
----------------------------------------------------------------------------------------
steps:
- name: gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81
args:
- --dockerfile=Dockerfile-uppercase
- --destination=gcr.io/my-project/kaniko_fail_example_capital # note: change 'your-project' to your google cloud
@BenHizak
Copy link
Author

Reported as Kaniko issue #770

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