我已经建立了一个由三名工人和一名经理组成的码头集群。我想使用自定义Dockerfile从映像构建中启动三个worker上的容器。 节点正确注册到管理器:
docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
0viqhgcdwul2vhvmgxbv31eg0 worker1 Ready Active
mabikwr5ufwa7lv8xk0liyqbd worker3 Ready Active
s1m1qiarlyfgtljghgomcztlb worker2 Ready Active
tqp7m2ohzvgqc9c60aex4x9u5 * manager Ready Drain Leader
但是当我执行以下命令时,
docker service create --replicas 3 -p 8080:8080 --name myService myImage
worker1不执行容器,我收到以下错误:
unable to pin image myImage to digest: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
总是worker1失败,其他人都是正确的,图像按预期工作。它来自哪里,我该如何解决这个问题?