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-ce and docker-ce-cli version mismatch when the 'version' option set #903

Open
vitargelo opened this issue Feb 27, 2023 · 1 comment

Comments

@vitargelo
Copy link

vitargelo commented Feb 27, 2023

Describe the Bug

When the version option is set to a specific version, docker-ce-cli package latest version installed.

  class { 'docker':
    version        => '5:20.10.21~3-0~ubuntu-focal',
    ip_forward     => false,
    iptables       => false,
    ip_masq        => false,
    log_driver     => 'json-file',
  }

And the result:

$ docker -v

Docker version 23.0.1, build a5ee5b1

$ docker version

Client: Docker Engine - Community
 Version:           23.0.1
 API version:       1.41 (downgraded from 1.42)
 Go version:        go1.19.5
 Git commit:        a5ee5b1
 Built:             Thu Feb  9 19:46:56 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          20.10.21
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.7
  Git commit:       3056208
  Built:            Tue Oct 25 18:00:04 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.18
  GitCommit:        2456e983eb9e37e47538f59ea18f2043c9a73640
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Expected Behavior

Both, the docker engine and docker CLI have the same defined version (20.10.21)

Environment

  • Version [6.0.1]
  • Platform [Ubuntu 20.04]

Additional Context

When trying to install a specific version of the docker-ce package with apt, for some reason it installs the latest docker-ce-cli version as a dependency. Official docker documentation says that we need to set a specific version for both packages in a single command.

 VERSION_STRING=5:20.10.13~3-0~ubuntu-jammy
 sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin

Maybe possible solution is to set-up docker-ce-cli before docker-ce with puppet package resource.

@vitargelo
Copy link
Author

Related issues: #895 #865

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

No branches or pull requests

2 participants