我正试图按照GitLab示例代码来使用这里概述的kaniko。我唯一改变的地方是我使用的是v1.7.0-debug标记,而不是简单的debug。
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:v1.7.0-debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"我的构建工作正在按部就班地进行:
Running with gitlab-runner 14.4.0 (4b9e985a)
on gitlab-runner-gitlab-runner-84d476ff5c-mkt4s HMty8QBu
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: gitlab-runner
Using Kubernetes executor with image gcr.io/kaniko-project/executor:v1.7.0-debug ...
Using attach strategy to execute scripts...
Preparing environment
00:03
Waiting for pod gitlab-runner/runner-hmty8qbu-project-31186441-concurrent-0bbt8x to be running, status is Pending
Running on runner-hmty8qbu-project-31186441-concurrent-0bbt8x via gitlab-runner-gitlab-runner-84d476ff5c-mkt4s...
Getting source from Git repository
00:01
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/...
Created fresh repository.
Checking out 4d05d22b as ci...
Skipping Git submodules setup
Executing "step_script" stage of the job script它只是停留在Executing "step_script",永远不会前进。我已经研究了所有,并阅读了我所能找到的尽可能多的文档,但无法解决这个问题。
设置
发布于 2021-12-02 19:55:04
这最终导致了在运行程序配置toml中如何配置Kubernetes自己的问题。我们为运行程序使用的默认容器映像需要修改PATH环境变量,因此我们使用environment配置设置来执行概述的这里。这个PATH变量似乎不包括kaniko调试映像中定义的busybox。从那以后,我们移动了PATH在我们的Docker映像中的变化,它应该在最初的位置上,并且一切都在按预期进行。
https://stackoverflow.com/questions/69935866
复制相似问题