Skip to content
New issue

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

docker compose pull skipped #9773

Closed
martadinata666 opened this issue Aug 21, 2022 · 7 comments · Fixed by #9777
Closed

docker compose pull skipped #9773

martadinata666 opened this issue Aug 21, 2022 · 7 comments · Fixed by #9777
Assignees

Comments

@martadinata666
Copy link

martadinata666 commented Aug 21, 2022

docker compose pull dont pull new image from registry

As prev version 2.9 when i issue docker compose pull it will pull new image/check from registry. On ver 2.10 the download will skipped due it already exist locally

⠿ server Skipped - Image is already present locally 

Steps to reproduce the issue:

  1. Upgrade compose 2.10
  2. Issue docker compose pull
  3. Image skipped

Describe the results you received:
Download skipped due exist locally

Describe the results you expected:
Compose will pull image

Additional information you deem important (e.g. issue happens only occasionally):
Compose file snipped

 app:
    image: 192.168.0.2:5050/dedyms/shinobi:dev
    group_add:
       - video
    environment:
       - PLUGIN_KEYS={}
       - SSL_ENABLED=false
       - DB_HOST=db

related to
d62c9fe
#9173

I saw this thread about this pull_policy #9730 , seems not affecting. Am i need something to my compose file to force download?

Output of docker compose version:

Docker Compose version v2.10.0

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
  compose: Docker Compose (Docker Inc., v2.10.0)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 77
  Running: 77
  Paused: 0
  Stopped: 0
 Images: 67
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local local-persist
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: xozatfoct17qlmritcn2fhwwi
  Is Manager: true
  ClusterID: vhkt77e8sz6p1y01qsjb10c93
  Managers: 1
  Nodes: 3
  Default Address Pool: 10.0.0.0/8  
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 1
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 192.168.0.2
  Manager Addresses:
   192.168.0.2:2377
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb
 runc version: v1.1.3-0-g6724737
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.15.0-46-lowlatency
 Operating System: Ubuntu 22.04.1 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 6
 Total Memory: 31.02GiB
 Name: homelab
 ID: 2JTD:RTQI:7ACK:663S:F2DR:T5MR:BAHF:VMYN:WOAE:WWVC:HHVS:KCSN
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: martadinata666
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  192.168.0.2:5050
  127.0.0.0/8
 Live Restore Enabled: false
 Default Address Pools:
   Base: 172.17.0.0/16, Size: 16
   Base: 172.18.0.0/16, Size: 16
   Base: 172.19.0.0/16, Size: 16
   Base: 172.20.0.0/16, Size: 16
   Base: 172.21.0.0/16, Size: 16
   Base: 172.22.0.0/16, Size: 16
   Base: 172.23.0.0/16, Size: 16
   Base: 172.24.0.0/16, Size: 16
   Base: 172.25.0.0/16, Size: 16
   Base: 172.26.0.0/16, Size: 16
   Base: 172.27.0.0/16, Size: 16
   Base: 172.28.0.0/16, Size: 16
   Base: 172.29.0.0/16, Size: 16
   Base: 172.30.0.0/16, Size: 16
   Base: 192.168.0.0/16, Size: 20

Additional environment details:

Ubuntu 22.04
@martadinata666 martadinata666 changed the title docker compose pull at 2.10 docker compose pull skipped Aug 21, 2022
@StewGoin
Copy link

I'm seeing the same behavior on Debian 11.4

@chrisleekr
Copy link

Is there any way I can force it to download the latest images from the registry?
I added pull_policy: always, but it does not seem to work.

@RealOrangeOne
Copy link

Similarly, docker compose up -d --pull=always also doesn't attempt to pull the container, presumably assuming that the local one is fine.

@laurazard laurazard self-assigned this Aug 22, 2022
@TommyKolodziejczyk
Copy link

I can update container using docker pull directly but docker compose pull /docker-compose pull are not checking if there is updated version

nicksieger added a commit to nicksieger/compose that referenced this issue Aug 22, 2022
nicksieger added a commit to nicksieger/compose that referenced this issue Aug 22, 2022
@nicksieger
Copy link
Member

nicksieger commented Aug 22, 2022

Thanks for the reports. Looks like we overlooked handling pull policy always in the fix for #9173.

I have a fix in #9777, which includes a potential change in behavior that seems to make sense. Based on comments here, it seems like all of you expect a default pull policy of always when using docker compose pull. Thoughts?

Nevermind, I looked at the previous behavior and made sure the logic still matches, which is that pulls are only skipped when pull_policy is missing/if_not_present/never.

nicksieger added a commit to nicksieger/compose that referenced this issue Aug 22, 2022
nicksieger added a commit to nicksieger/compose that referenced this issue Aug 22, 2022
@martadinata666
Copy link
Author

martadinata666 commented Aug 22, 2022

Thanks for the reports. Looks like we overlooked handling pull policy always in the fix for #9173.

I have a fix in #9777, which includes a potential change in behavior that seems to make sense. Based on comments here, it seems like all of you expect a default pull policy of always when using docker compose pull. Thoughts?

Agreed, docker compose pull should always pull except it defined/override by pull_policy. i read different pull_policy existed and can be used if the user want it to override always pull behaviour #9730 (comment)

The problem with #9173 is it didn't respect pull_policy either defined at compose file or when issued directly via command line.

@geozeke
Copy link

geozeke commented Aug 22, 2022

Thanks @nicksieger. It does seem like the "classic" default behavior is to always pull unless overridden by a pull_policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants