docker / docker/docker-install

version-selection fails if the version matches the distro version

Open
#526 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
3.2k
Forks
863
Avg merge
3h 15m
Merged PRs (30d)
2

Description

This was a fun one I ran into this when trying to install an old version of docker for testing. The machine I ran this on was an ubuntu 24.04 "noble" machine; when I tried to install Docker 24.0, it matched the 24.04 version in the packages, resulting it to install the latest version (docker 28.4.0);

curl -fsSL get.docker.com | VERSION=24.0 sh
# Executing docker install script, commit: 30c930eeebfc0bdf50564bcda65e90588b35ec2a
+ sh -c apt-get -qq update >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ca-certificates curl >/dev/null
+ sh -c install -m 0755 -d /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" -o /etc/apt/keyrings/docker.asc
+ sh -c chmod a+r /etc/apt/keyrings/docker.asc
+ sh -c echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu noble stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get -qq update >/dev/null
INFO: Searching repository for VERSION '24.0'
INFO: apt-cache madison docker-ce | grep '24.0' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
INFO: apt-cache madison docker-ce-cli | grep '24.0' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install docker-ce=5:28.4.0-1~ubuntu.24.04~noble docker-ce-cli=5:28.4.0-1~ubuntu.24.04~noble containerd.io docker-compose-plugin docker-ce-rootless-extras=5:28.4.0-1~ubuntu.24.04~noble docker-buildx-plugin >/dev/null

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the installer entry point invoked by get.docker.com and inspect the apt-cache madison filtering shown in the report. Reproduce VERSION=24.0 on Ubuntu 24.04, then verify that the selected package versions correspond to Docker 24.0 rather than the distro version 28.4.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell, ubuntu
Domain
cli, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.