Check Docker APT repo

Learn how to check Docker APT repo

To determine which Linux distribution the Docker installation is configude to download from, you can check the Docker APT repository configuration on your system.

Inspect Docker APT repository or Check the Repository file. If the repository is found in a file (e.g., /etc/apt/sources.list.d/docker.list), you can inspect it directly:

# option 1: inspect the docker apt repository
grep -r "download.docker.com" /etc/apt/sources.list /etc/apt/sources.list.d/
 
# option 2: check the repository file
cat /etc/apt/sources.list.d/docker.list

If you see multiple entries for download.docker.com in your APT sources, you can determine which one is being used by checking the pinned priority or by inspecting the package metadata.

Look for the Distribution name. In the output, look for the distribution name (e.g., focal, jammy, bullseye). It will look something like this:

deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable

Verify the current distribution

To confirm the distribution your system is running, use:

lsb_release -cs

This will return the codename of your distribution (e.g., jammy for Ubuntu 22.04).

Compare the results

Ensure that the distribution in the Docker repository matches your system's distribution. If they don't match, you may need to update the repository configuration.

Written by

KarChunT

Last Updated

Sat May 10 2025

Tags

LinuxDocker