Jump toSuggest an edit

How to install Docker Engine on a Scaleway Instance running Ubuntu Jammy Jellyfish (22.04 LTS)

Reviewed on 08 February 2024Published on 01 August 2023
  • docker
  • ubuntu
  • jammy-jellyfish

Docker is a powerful and widely used open-source platform that enables developers to automate the deployment, scaling, and management of applications consistently and efficiently.

The tool allows you to run software in a standardized environment called a “container” that encapsulates an application along with all its dependencies and configurations.

Docker Engine is the core component of the Docker platform. It is the runtime that allows you to create, run, and manage Docker containers. Docker Engine is responsible for building, running, and distributing containers. It includes the Docker daemon, a long-running process responsible for managing Docker objects like images, containers, volumes, and networks. The main components that you install by following this tutorial are:

  • Docker daemon: The Docker daemon is a background service responsible for managing Docker containers, images, networks, and volumes. It listens for Docker API requests and handles container lifecycle operations like starting, stopping, and monitoring containers.
  • Docker CLI: The Docker Command Line Interface (CLI) is a tool that allows you to interact with Docker. It provides a set of commands to manage containers, images, networks, volumes, and other Docker resources.
  • Docker Compose: Docker Compose is a tool that allows you to define and manage multi-container applications using a YAML file. It simplifies the process of defining the services, networks, and volumes required for your application stack.
  • Containerd: containerd is an open-source container runtime that serves as the industry-standard container runtime interface (CRI) between higher-level container management systems (such as Docker and Kubernetes) and the low-level kernel features responsible for running containers.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • An SSH key
  • An Instance running on Ubuntu Jammy Jellyfish (22.04 LTS)
  • sudo privileges or access to the root user

Installing Docker Engine on Ubuntu Jammy Jellyfish (22.04 LTS)

Before installing Docker Engine on a new host machine, you must configure the Docker repository. Once the repository is set up, you can proceed to install and keep Docker updated directly from the repository.

  1. Log in to your Instance using SSH:
    ssh root@<YOUR_INSTANCE_IP>
  2. Update the apt package cache and upgrade the software already installed on your Instance to the latest version available in the repository:
    apt update && apt upgrade -y

Setting up the Docker repository

  1. Install packages that are required to download the required packages for Docker using apt via an HTTPS connection.

    apt install ca-certificates curl gnupg
  2. Add the official Docker GPG key to validate the downloaded packages.

    install -m 0755 -d /etc/apt/keyrings
    curl -fsSL | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    chmod a+r /etc/apt/keyrings/docker.gpg
  3. Use the following command to configure the Docker repository:

    echo \
    "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] \
    "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
    tee /etc/apt/sources.list.d/docker.list > /dev/null

Installing Docker Engine using apt

  1. Update the apt package cache:

    apt update
  2. Install the latest version of Docker Engine, containerd, and Docker Compose:

    apt install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin -y
  3. Verify that the installation of Docker Engine was successful by running the following command. This command will download a test image and execute it within a container. Once the container is running, it displays a confirmation message and terminates.

    docker run hello-world

    You have now successfully installed the latest version of Docker Engine on your Instance.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway