Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk10 min

How to Install Docker on Ubuntu and Fix APT Resolve Errors

A complete Ubuntu Docker Engine installation guide with the current deb822 repository setup, keyring commands, verification steps, and fixes for apt package, GPG, 404, transport, and dependency errors.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable way to install Docker on Ubuntu is to use Docker Engine’s official APT repository, configure a repository-specific keyring, match the repository suite to your Ubuntu codename and architecture, and then install the Engine packages. If APT cannot locate docker-ce, reports a NO_PUBKEY, returns a 404, or shows dependency conflicts, fix the repository or trust error first; repeating apt install will not repair a broken package index.

This guide covers supported Ubuntu releases, the exact installation commands, repository diagnostics, signature and dependency repairs, verification, and the security implications of Docker’s daemon and published ports.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check Ubuntu and architecture support first

Docker’s current Ubuntu support page lists 64-bit Ubuntu Resolute 26.04 LTS, Noble 24.04 LTS, and Jammy 22.04 LTS. The listed architectures are amd64, armhf, arm64, s390x, and ppc64le. The repository suite must match the Ubuntu release codename, not a Debian codename or an arbitrary derivative name.

Run these commands before changing APT configuration:

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
. /etc/os-release
printf 'ID=%s VERSION_ID=%s VERSION_CODENAME=%s UBUNTU_CODENAME=%sn' "$ID" "$VERSION_ID" "$VERSION_CODENAME" "${UBUNTU_CODENAME:-}"
dpkg --print-architecture

For a normal Ubuntu installation, ID should be ubuntu. The value used for Docker’s Suites: field should be UBUNTU_CODENAME when it exists, with VERSION_CODENAME as the fallback. On the releases currently listed by Docker, the resulting suite is usually jammy, noble, or resolute.

If you are running an Ubuntu derivative, check that derivative’s compatibility guidance before selecting an Ubuntu suite. A derivative may identify itself differently or omit a codename, and Docker does not automatically support every Ubuntu-based distribution.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose Docker Engine or Docker Desktop

For servers, headless systems, CI workers, and a conventional Linux daemon, install Docker Engine from APT. Engine is managed with systemd and the command-line client, and it follows the package procedure below.

Docker Desktop is a separate graphical application. Docker documents it as a downloaded DEB installation with its own desktop prerequisites, rather than as a replacement command for the Engine repository procedure.

Consideration Docker Engine Docker Desktop
Typical workflow Server, headless host, terminal and systemd Graphical desktop application
Installation source Docker’s APT repository Downloaded DEB package after its documented prerequisites
Operational control Direct daemon and package management on the host Desktop-managed application experience
Best fit Production servers and automation Developers who want an integrated desktop workflow

Both choices require a supported Ubuntu release and architecture. This article’s commands install Docker Engine.

Install Docker Engine from the official repository

1. Remove packages that conflict with Docker’s packages

Ubuntu repositories or previous installations may provide packages whose names overlap with Docker’s distribution. Docker’s documented removal command targets those packages:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc docker-buildx podman-docker containerd runc | cut -f1)

This removes the named packages when they are installed. Docker notes that removing them does not automatically delete existing images, containers, volumes, or networks stored under /var/lib/docker. Do not manually remove that directory unless you intentionally want to erase Docker data.

2. Install prerequisites and create a keyring directory

Refresh Ubuntu’s package index, install certificate and download utilities, and create the directory used for repository-specific keys:

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings

Download Docker’s signing key from https://download.docker.com/linux/ubuntu/gpg and make it readable by APT:

sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

The key belongs to this repository configuration only. Ubuntu recommends repository-specific keyrings and no longer recommends the old global apt-key workflow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Add Docker’s deb822 repository definition

Create /etc/apt/sources.list.d/docker.sources with the official Ubuntu repository, the host’s Ubuntu codename, and the host architecture:

sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF

The URIs value must use Docker’s Ubuntu path, https://download.docker.com/linux/ubuntu. Do not substitute the Debian path. The shell expression chooses UBUNTU_CODENAME when available and otherwise uses VERSION_CODENAME; the architecture expression prevents APT from requesting packages for a different architecture.

Refresh the package index immediately after creating the file:

sudo apt update

Read every line of this update. APT’s local package index is what makes packages such as docker-ce visible. If this command reports a repository, key, DNS, TLS, or Release-file error, repair that error before attempting installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Install the Engine and standard plugins

Once apt update completes without Docker repository errors, install the Engine, command-line client, container runtime, Buildx plugin, and Compose plugin:

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

These packages are Docker’s standard package-managed set. If APT proposes packages from an unexpected vendor or cannot choose a candidate, stop and inspect repository origins and candidates instead of forcing the transaction.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

5. Check the systemd service

On Debian and Ubuntu, Docker’s service starts on boot by default. Check its current state:

sudo systemctl status docker

If it is installed but inactive, start it:

sudo systemctl start docker

A running service should show an active state. If systemd reports a startup failure, inspect the service output with your normal systemd diagnostics before proceeding to container tests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

6. Run Docker’s test container

Run the official test image:

sudo docker run hello-world

A successful run confirms that the client can contact the daemon, the daemon can create a container, and the image workflow is functioning. The first run may need to download the image, so it also exercises outbound registry connectivity.

Fix “Unable to locate package docker-ce” and “no installation candidate”

These messages mean APT has no installable candidate in its current package index. Work through the checks in this order.

Confirm that the source file exists and points to Docker’s Ubuntu repository

sudo sed -n '1,120p' /etc/apt/sources.list.d/docker.sources

Look for:

  • URIs: https://download.docker.com/linux/ubuntu
  • A Suites: value matching the host’s Ubuntu codename
  • An Architectures: value matching dpkg --print-architecture
  • Signed-By: /etc/apt/keyrings/docker.asc

A Debian suite such as bookworm, a misspelled codename, or an architecture different from the host prevents APT from finding Docker’s Ubuntu packages.

Refresh the index and resolve every update error

sudo apt update

Do not treat warnings or errors from the Docker source as harmless. Until APT has downloaded a valid index, the installer may continue to report that docker-ce is unavailable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inspect candidates and available versions

apt policy docker-ce
apt list --all-versions docker-ce

apt policy shows the candidate version and repository origin when APT can see the package. The version list shows which builds are visible to the local index. If both commands show no candidate, return to the source suite, architecture, and apt update checks.

Remove duplicate or stale Docker entries

List all additional source files:

ls -la /etc/apt/sources.list.d/

A previous one-line file such as a Docker .list entry can remain active alongside the new docker.sources file. Duplicate entries may reference an obsolete key, a wrong suite, or the Debian repository. Remove or correct stale Docker entries, then run sudo apt update again. Keep one deliberate Docker repository definition rather than mixing old and new formats.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Fix NO_PUBKEY, signature, and “repository is not signed” errors

These are trust failures. APT is refusing to use packages because it cannot validate the repository metadata with the configured signing key.

Recreate the repository keyring

Download the key again and restore its permissions:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Then verify that docker.sources contains exactly:

Signed-By: /etc/apt/keyrings/docker.asc

Remove references to obsolete key files

Inspect every Docker source entry under /etc/apt/sources.list and /etc/apt/sources.list.d/. Delete or correct entries that use an old Docker key path, a deprecated global key setup, or a duplicate repository definition. Run:

sudo apt update

Never “solve” a signature error with --allow-unauthenticated, disabled certificate checks, or other options that bypass verification. Those options remove the protection that tells APT whether repository metadata is authentic.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fix 404 and “does not have a Release file” errors

A 404 or missing Release file generally means APT requested a path Docker does not publish. The most common causes are a wrong suite, a wrong distribution path, or an unsupported derivative.

Check the suite against the host

. /etc/os-release
echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}"

Use that value in Suites:. Docker’s currently listed Ubuntu suites are jammy, noble, and resolute. Do not replace an Ubuntu suite with a Debian codename.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the repository path

The repository must be:

https://download.docker.com/linux/ubuntu

A Debian URL is a different distribution path and will not provide the expected Ubuntu Release metadata.

Handle Ubuntu derivatives carefully

If /etc/os-release identifies a derivative rather than Ubuntu, Docker may not publish a suite bearing that derivative’s codename. Use an Ubuntu release only when the derivative’s own documentation confirms compatibility, and understand that this is a compatibility decision rather than proof that the derivative is officially listed in Docker’s Ubuntu matrix.

Fix dependency and “packages are not installable” errors

Dependency failures often result from an incomplete package index, conflicting runtime packages, mixed distributions, or repository pinning.

  1. Make the index clean. Run sudo apt update and resolve all errors before retrying the install.
  2. Remove conflicting runtime packages. Re-run Docker’s removal command for containerd, runc, distribution Docker packages, and other overlapping names listed earlier.
  3. Check candidates. Use apt policy docker-ce docker-ce-cli containerd.io runc containerd to see which repository supplies each candidate.
  4. Review repository consistency. Do not combine Debian and Ubuntu Docker repositories, or mix an old one-line Docker source with the current deb822 source.
  5. Check pinning and third-party origins. Ubuntu warns that third-party packages can conflict with official packages. If multiple vendors provide similarly named packages, inspect APT preferences and repository origins before changing versions.

Do not force an installation by accepting an unrelated candidate simply because its name looks similar. Docker’s packages are designed to be installed as a compatible set.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix DNS, TLS, and connection errors during apt update

Messages about host lookup, certificates, time, proxies, or failed HTTPS connections are transport failures, not package-resolution failures. Package commands cannot succeed until APT can securely reach the repository.

  • DNS: Confirm that the system can resolve download.docker.com using the network’s configured resolver.
  • System time: Check the host clock. An incorrect date can make valid TLS certificates appear expired or not yet valid.
  • Proxy settings: Verify any APT proxy configuration and ensure the proxy permits outbound HTTPS to the Docker repository.
  • Outbound access: Check firewall, routing, and corporate egress controls for HTTPS traffic.

After correcting the transport problem, run sudo apt update again and inspect the result. Do not substitute --allow-unauthenticated or disabled certificate verification for a real DNS, proxy, or TLS fix.

Post-install access and security decisions

The Docker socket is root-controlled

By default, the daemon uses a root-owned Unix socket rather than a TCP port. Commands therefore normally require sudo, as in sudo docker run hello-world.

Adding a user to the docker group allows Docker commands without sudo, but membership grants root-equivalent control of the daemon. A process that can use that socket can effectively control the host through Docker. Treat group membership as a privileged access decision, not a harmless convenience. If you choose to use it, apply your organization’s access policy and start a new login session before testing the change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review firewall behavior for published ports

Docker warns that published container ports can bypass ordinary ufw or firewalld expectations. Publishing a port with a container run or Compose configuration can therefore expose a service even when a host firewall rule appears to block it.

Use Docker’s supported iptables-nft or iptables-legacy modes, and place filtering rules in the DOCKER-USER chain when you need rules that apply before Docker’s forwarding rules. Test from the networks that should and should not be able to connect; do not assume a rule in a high-level firewall interface alone controls every published Docker port.

A concise repair checklist

  • Confirm the host is a supported 64-bit Ubuntu release and that its architecture is one Docker lists.
  • Remove conflicting distribution Docker, containerd, and runc packages.
  • Install ca-certificates and curl; create /etc/apt/keyrings.
  • Download Docker’s key to /etc/apt/keyrings/docker.asc and set it readable by APT.
  • Create one docker.sources file using the Ubuntu repository URL, the host codename, host architecture, and Signed-By.
  • Run sudo apt update and repair every error before installation.
  • Use apt policy docker-ce and apt list --all-versions docker-ce when no candidate appears.
  • Install docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, and docker-compose-plugin.
  • Check sudo systemctl status docker, start it if necessary, and run sudo docker run hello-world.
  • Review Docker socket privileges and firewall rules before exposing containers beyond the local host.

Final verdict

Most Ubuntu Docker installation failures are repository-configuration failures rather than Docker Engine failures. Matching the Ubuntu suite and architecture, using the current deb822 source with a repository-specific keyring, and insisting on a clean apt update removes the usual causes of missing packages, signature errors, 404 responses, and dependency conflicts. After installation, the systemd check and hello-world test confirm the daemon path, while an explicit review of socket access and published-port filtering keeps the working installation from becoming an unintended privilege or network exposure.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.