We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我的集群是1.23.0版本
使用作者的Dockerfile发现了一些问题: FROM busybox COPY ./in-cluster /in-cluster USER 65532:65532 ENTRYPOINT /in-cluster
执行kubectl run in-cluster -i --image=docker.io/in-cluster:v0.0.1 --restart=Never --overrides='{"spec": {"imagePullSecrets": [{"name": "image-pull-secret"}]}}'会报错:
pod default/in-cluster terminated (Error)
单从image的size上来说,busybox更小。不过busybox默认的libc实现是uClibc,而我们通常运行环境使用的libc实现都是glibc,因此我们要么选择静态编译程序,要么使用busybox:glibc镜像作为base image。
所以我把Dockerfile改为: FROM busybox:glibc WORKDIR / COPY in-cluster . ENTRYPOINT ["./in-cluster"] 就可以正常执行程序了。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我的集群是1.23.0版本
使用作者的Dockerfile发现了一些问题:
FROM busybox
COPY ./in-cluster /in-cluster
USER 65532:65532
ENTRYPOINT /in-cluster
执行kubectl run in-cluster -i --image=docker.io/in-cluster:v0.0.1 --restart=Never --overrides='{"spec": {"imagePullSecrets": [{"name": "image-pull-secret"}]}}'会报错:
pod default/in-cluster terminated (Error)
单从image的size上来说,busybox更小。不过busybox默认的libc实现是uClibc,而我们通常运行环境使用的libc实现都是glibc,因此我们要么选择静态编译程序,要么使用busybox:glibc镜像作为base image。
所以我把Dockerfile改为:
FROM busybox:glibc
WORKDIR /
COPY in-cluster .
ENTRYPOINT ["./in-cluster"]
就可以正常执行程序了。
The text was updated successfully, but these errors were encountered: