使用docker cloud builder,我可以这样指定bash
或sh
的入口点:
cloudbuild.yaml
steps: - name: 'gcr.io/cloud-builders/docker' id: BuildDockerImages entrypoint: /bin/sh args: - '-c' - | set -x && \ ./build_and_push_images.sh env: - 'CLOUDSDK_COMPUTE_ZONE=us-central1-a' - 'CLOUDSDK_CONTAINER_CLUSTER=standard-cluster-1'
但是无论我在kubectl cloud builder的bash
中指定任何shell程序(sh
或entrypoint
),在cloudbuild中都会收到以下错误:
Step #2 - "UpdateImages": docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"sh - '-c' - | set -x && \\\\ echo hi\": executable file not found in $PATH": unknown.
这是配置:
cloudbuild.yaml
- name: 'gcr.io/cloud-builders/kubectl' id: UpdateImages entrypoint: sh # or bash, /bin/sh, /bin/bash - '-c' - | set -x && \ ./devops/update_k8s_deployment.sh env: - 'CLOUDSDK_COMPUTE_ZONE=us-central1-a' - 'CLOUDSDK_CONTAINER_CLUSTER=standard-cluster-1'
我想念什么吗?为什么我不能指定入口点?我是否需要每次使用其他生成器并安装kubectl?