Docker Installation

For linux, download from http://docs.docker.com/engine/installation/linux/. For Ubuntu, read and follow the step here.

  1. Check the kernel machine. The kernel should be newer than 3.1. Also docker requires 64-bit Ubuntu.

    My kernel version is 4.4.0-38 (PASS)
  2. Update APT source
    Update system

    Update package information, ensure that APT works with the https method, and that CA certificates are installed.

    Add the new GPG key

    Then Open the /etc/apt/sources.list.d/docker.list file in your favorite editor. If the file doesn’t exist, create it.

    Make sure the file is empty or remove any existing entries. Add this on file for Ubuntu Trusty 14.04 (LTS)

    Save and close the file.
    Update the system

    Purge the old repo if it exists.

    Verify that APT is pulling from the right repository.

    CONT….

20260730

Install Docker on Ubuntu 22.04

It looks like you’ve run into a package conflict while trying to install Docker. This is a common issue on Ubuntu and can be resolved by removing the conflicting package and then using Docker’s official installation repository, which is the recommended method.

The error containerd.io : Conflicts: containerd means that a package required by docker.io (which is containerd.io) conflicts with a version of containerd that is already on your system or available in a different repository.

Here is a step-by-step guide to fix this and get Docker installed correctly.

Step 1: Uninstall Old and Conflicting Packages

First, let’s remove the conflicting containerd package and any other old Docker-related packages to ensure a clean slate.

Step 2: Set Up the Official Docker Repository

Instead of using docker.io from the default Ubuntu repository, it’s best to use the official Docker repository. This ensures you get the latest version and avoid conflicts.

  1. Update your package list and install prerequisites:

  2. Add Docker’s official GPG key:

  3. Set up the repository:

Step 3: Install Docker Engine

Now that the correct repository is set up, update your package list again and install the latest Docker packages.

Step 4: (Optional but Recommended) Manage Docker as a Non-Root User

To avoid having to type sudo every time you run a Docker command, add your user to the docker group.

Important: You will need to log out and log back in for this group change to take effect.

After following these steps, Docker should be installed correctly. You can verify it by running:

Once Docker is running, you can proceed with the SonarQube setup I outlined previously, starting with the docker run command for SonarQube. Let me know if you encounter any other issues

Leave a Reply

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