Description
Docker stack deploy does not pull a new image when you currently don't have the tag on your system
Steps to reproduce the issue:
- image: username/image:old-version
+ image: username/image:new-version
docker stack deploy -c docker-compose.yml my-stackdocker pull username/image:new-version
docker stack deploy -c docker-compose.yml my-stackDescribe the results you received:
running docker service ls shows that none of the services have started. They only start after you make a manual pull of the new images.
Describe the results you expected:
I expected the images to get pulled
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:11:19 2017
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:09:53 2017
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 140
Running: 8
Paused: 0
Stopped: 132
Images: 22
Server Version: 17.12.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
NodeID: i26xs2a6hv3ye285qk0o0gktr
Is Manager: true
ClusterID: 8b6emsr1zvlh6s0mcbq4xjfdp
Managers: 1
Nodes: 1
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 172.31.30.238
Manager Addresses:
172.31.30.238:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-1047-aws
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.453GiB
Name: ip-172-31-30-238
ID: O4HE:YD4J:IWZC:IR33:53YN:5VDD:KFZZ:EOIQ:OUW3:GI2L:BRDO:2VFL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: nanomosfet
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.):
AWS
Is this a private repo? Did you check the error on the services? If it is a private repo did you deploy with "--with-registry-auth"?
Thank you! That fixed it
@nanomosfet
I tried to deploy with below command still its not pulling my private registry images
docker stack deploy --with-registry-auth --compose-file docker-compose.yml DEV
I i do a docker pull images-name .its able to download from private registry. Could you please let me know what changes needs to be done.
It doesn't work with me either, even when i add --with-registry-auth
Most helpful comment
Is this a private repo? Did you check the error on the services? If it is a private repo did you deploy with "--with-registry-auth"?