我有以下由 Dockerfile 创建的图像:
REPOSITORY TAG IMAGE ID CREATED SIZE
ruby/lab latest f1903b1508cb 2 hours ago 729.6 MB
我有以下的 YAML 文件:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ruby-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: ruby
spec:
containers:
- name: ruby-app
image: ruby/lab
imagePullPolicy: IfNotPresent
ports:
- containerPort: 4567
当我创建部署时,我在吊舱中得到了以下信息:
ruby-deployment-3830038651-sa4ii 0/1 ImagePullBackOff 0 7m
ruby-deployment-3830038651-u1tvc 0/1 ImagePullBackOff 0 7m
以及下面的错误 Failed to pull image "ruby/lab:latest": Error: image ruby/lab not found
:
8m 2m 6 {kubelet minikube} spec.containers{ruby} Normal Pulling pulling image "ruby/lab:latest"
8m 2m 6 {kubelet minikube} spec.containers{ruby} Warning Failed Failed to pull image "ruby/lab:latest": Error: image ruby/lab not found
8m 2m 6 {kubelet minikube} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "ruby" with ErrImagePull: "Error: image ruby/lab not found"
真的有必要为此在 Docker 注册吗?我只是想在本地进行测试,并将我的代码/repo 传递给一个朋友以进行测试
谢谢