I'm trying to use docker-stack
in some machines that only the manager of them can have internet connection. The docker-stack file looks like follows:
version: '3.7'
networks:
monitor-net:
services:
service:
image: aaa/bbb
networks:
- monitor-net
deploy:
mode: global
restart_policy:
condition: on-failure
The problem I faced is that docker stack
will pull the image, however my workers cannot connect to docker server, and it is impossible to pull it.
I tried to use docker save
and docker load
to transfer images which is downloaded by my manager node, however in docker stack ps
it still reports No such image: aaa/bbb:latest@sha256:xxxxxxx
.
I checked the digests of images and found with docker load
, the digest of the image is changed to <none>
so the loaded image is not recognized. Is there any way to transfer images to workers with their digests unchanged, or force docker stack
to use the image without checking its digest?