kaniko: build hanging at 'Unpacking rootfs as cmd RUN mkdir ... requires it'
Actual behavior
When using gcr.io/kaniko-project/executor:debug and
running /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile --destination ${CONTAINER_IMAGE} in gitlab runner build hangs.
Expected behavior
Build finishes successfully and image getting published to gcr
To Reproduce Steps to reproduce the behavior:
Dockerfile
FROM gcr.io/deeplearning-platform-release/tf2-cpu.2-1
RUN mkdir /tpu
COPY test.py /tpu/
.gitlab-ci.yml
stages:
- publish
variables:
CONTAINER_IMAGE: gcr.io/${GOOGLE_PROJECT_ID}/${CI_PROJECT_NAME}:${CI_COMMIT_SHORT_SHA}
publish:
stage: publish
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile --destination ${CONTAINER_IMAGE} --verbosity=debug
# Custom Functions -------------------------------------------------------
.custom_functions: &custom_functions |
function config_kubernetes() {
kubectl config set-cluster $KUBE_NAME --server="$KUBE_URL" --insecure-skip-tls-verify=true
kubectl config set-credentials cluster-admin --username="$KUBE_USER" --password="$KUBE_PASSWORD"
kubectl config set-context default --cluster=$KUBE_NAME --user=cluster-admin
kubectl config use-context default
echo $GOOGLE_SERVICE_JSON > ./gcloud-service-key.json
kubectl create secret generic kaniko-secret --from-file=./gcloud-service-key.json
}
before_script:
- *custom_functions
Triage Notes for the Maintainers
| Description | Yes/No |
|---|---|
| Please check if this a new feature you are proposing |
|
| Please check if the build works in docker but not in kaniko |
|
Please check if this error is seen when you use --cache flag |
|
| Please check if your dockerfile is a multistage dockerfile |
|
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 3
- Comments: 23 (2 by maintainers)
Same here:
amazonlinux:2022getting same issue with confluentinc/cp-kafka-connect-base:7.2.0 on 3rd run