
Docker is an open-source containerization platform that automates deploying, scaling, and managing applications in containers. Containers are lightweight and portable executable packages that contain all the necessary resources required to run an application. A container includes the application code, runtime, libraries, and dependencies that ensure consistency when running the application.
This article explains how to install Docker on an Ubuntu 24.04 server.
Vultr Cloud GPU instances running Ubuntu come with Docker as a pre-installed feature. Attempting to install Docker on these servers may result in conflicts with the NVIDIA Container Toolkit, potentially impacting GPU performance and container compatibility.
Before you begin, have access to an Ubuntu 24.04 server as a non-root user with sudo privileges.
Install the packages required to add the Docker repository.
Create the keyrings directory that APT uses to store repository signing keys.
Download the Docker GPG key to the keyrings directory.
Set read permissions on the key so APT can read it.
Add the Docker repository to your APT sources.
Update the package index.
Install Docker Engine and its plugins.
This command installs Docker Engine with the following components:
docker-ce: The Docker Engine community edition package.docker-ce-cli: The Docker command-line interface (CLI).containerd.io: A container runtime that manages the lifecycle of Docker containers.docker-buildx-plugin: Extends Docker's image-building capabilities for multi-platform builds.docker-compose-plugin: Manages multi-container Docker applications defined in YAML files.View the installed Docker version on your server.
Output:
Enable the Docker service to start automatically at boot.
On Ubuntu, the package installer already enables this service, so the command confirms it is enabled.
View the Docker service status.
Verify that the output shows active (running).
Run the following command to stop Docker.
Restart the Docker service.
Add your non-root user to the docker group to run Docker CLI commands without sudo privileges. Replace linuxuser with your actual username.
Enable the new user group changes in your active session.
You have installed Docker and the Docker Compose plugin on an Ubuntu 24.04 server, verified that the service is running, and added your user to the docker group. For more information, refer to the official Docker documentation.
0 Comments
Be the first to comment and share your perspective with the community.