not found error when add manifest-tool into kaniko #2794
Labels
area/filesystems
For all bugs related to kaniko container filesystems (mounting issues etc)
issue/missing-files
kind/question
Further information is requested
needs-follow-up
priority/p3
agreed that this would be good to have, but no one is available at the moment.
Actual behavior
A clear and concise description of what the bug is.
I want to move the manifest-tool into kaniko for multi-arch build. However when i copied manifest-tool into kaniko image, the maniest-tool can not run.
Expected behavior
A clear and concise description of what you expected to happen.
To Reproduce
Steps to reproduce the behavior:
Create a docker file:
FROM --platform=$TARGETPLATFORM golang:1.20 AS builder
RUN go install golang.org/x/tools/cmd/cover@latest
&& go install golang.org/x/lint/golint@latest
ENV REGISTRY_COMMIT=a4d9db5a884b70be0c96dd6a7a9dbef4f2798c51
RUN set -x
&& mkdir -p /go/src/github.com && cd /go/src/github.com
&& git clone https://github.com/estesp/manifest-tool
&& cd manifest-tool && make binary
FROM --platform=$TARGETPLATFORM gcr.io/kaniko-project/executor:debug
COPY --from=builder /go/src/github.com/manifest-tool/manifest-tool /usr/local/bin
build and push to docker
docker buildx build --platform linux/arm64,linux/amd64 -t gaussye/kaniko-full . --push
Run it on kubernetes:
apiVersion: v1
kind: Pod
metadata:
name: kaniko
spec:
nodeSelector:
containers:
image: gaussye/kaniko-full:latest
command:
args:
restartPolicy: Never
kubectl exec -it manifest-tool -n jenkins -- /bin/sh
/kaniko # ls
docker-credential-acr-env docker-credential-gcr manifest-tool warmer
docker-credential-ecr-login executor ssl
run manifest-tool get not found error, however the manifest-tool is there.
/kaniko # manifest-tool
/bin/sh: manifest-tool: not found
Additional Information
Please provide either the Dockerfile you're trying to build or one that can reproduce this error.
Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: