How to install Docker Images on Ubuntu 26.04

How to install Docker Images on Ubuntu 26.04

In this blog post, we will show you how to install Docker Images on Ubuntu 26.04 OS. Docker is an open-source platform for running applications in isolated environments called containers. The key concepts of Docker are containerization, Docker YAML file, Docker Engine, and Images. Containers are lightweight, isolated executable application environments. A Docker YAML file is a simple text file with all commands for building a Docker Image. Docker Engine is the core server-client application that manages containers, images, and other Docker objects. Since this tutorial covers installing (creating) Docker Images, a brief explanation will be provided in the next sections.

What is a Docker Image?

A Docker Image is a read-only template with instructions for creating a Docker container. A Docker Image is a snapshot of the container’s filesystem and configuration. It is an immutable, standardized package that ensures an application can run across different environments, from local computers to public servers. A Docker Image contains all the libraries, dependencies, and files that the container needs to run. A Docker image is shareable and portable, allowing us to deploy the same image across multiple locations simultaneously—much like a software binary. We can store images in registries to track complex software architecture, projects, business segments, and user group access.

What is Docker Hub?

Docker Hub is the largest cloud-based service for storing, managing, and sharing Docker Images. Docker Hub is the central repository for both open-source images and private team-specific images. It provides official images for Ubuntu, Nginx, MySQL, WordPress, Laravel, and many other tools for automation and deployment, helping developers and administrators quickly build, run, and ship their applications. On Docker Hub, we can push the images that we created, including all dependencies, and other developers can pull the exact image we pushed. In other words, Docker Hub is like GitHub’s version control system, but for Docker images only. In our blog post, we will show you how to install a Docker Image from the official Docker Hub registry.

Installing Docker Images is a straightforward process that takes a couple of seconds, but there are plenty of steps we need to take before creating our first Docker Image. Let’s dig deeper into this!

Prerequisites

Step 1. Update the System

Before we start with the installation of the Docker service, we will update the system packages to their latest versions available:

apt update -y && apt upgrade -y

Step 2. Install Docker Engine

By default, Docker is included in the official repository. To install Docker, simply execute the following command:

apt install docker.io -y

Once installed, start and enable the Docker service with the command below:

systemctl start docker && systemctl enable docker

To check the status of the service, you can use the following command:

[email protected]:~# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: enabled)
     Active: active (running) since Sat 2026-01-17 01:00:40 UTC; 4min 19s ago
 Invocation: edf2a008cc9545248b8e4318d94397e0
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 53651 (dockerd)
      Tasks: 9
     Memory: 111.6M (peak: 113.3M)
        CPU: 407ms
     CGroup: /system.slice/docker.service
             └─53651 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Step 3. Install Docker Image

Once Docker is installed, we can easily search and install Docker Images. Let’s find a Docker Image for WordPress installation:

docker search wordpress

You should receive an output similar to this:

root@ubuntu26:~# docker search wordpress
NAME                      DESCRIPTION                                     STARS     OFFICIAL
wordpress                 The WordPress rich content management system…   5857      [OK]
bitnami/wordpress         Bitnami Secure Image for wordpress              281       
bitnamicharts/wordpress   Bitnami Helm chart for WordPress                2         
elestio/wordpress         WordPress, verified and packaged by Elestio     6         
secoresearch/wordpress    Apache+PHP+Varnish+Wordpress                    0         
shinsenter/wordpress      (PHP / WordPress) Production-ready Docker…   5         
vulhub/wordpress                                                          4         
chainguard/wordpress      Build, ship and run secure software with Cha…   0         
corpusops/wordpress       https://github.com/corpusops/docker-images/     0         
rootpublic/wordpress                                                      0         
centurylink/wordpress     WordPress image with MySQL removed.             14        
erikzenker/wordpress      wordpress docker image                          0         
arm32v7/wordpress         The WordPress rich content management system…   16        
arm64v8/wordpress         The WordPress rich content management system…   21        
tutum/wordpress           Out-of-the-box WordPress docker image           42        
amd64/wordpress           The WordPress rich content management system…   2         
demyx/wordpress           Non-root Docker image running Alpine Linux, …   2         
i386/wordpress            The WordPress rich content management system…   1         
ppc64le/wordpress         The WordPress rich content management system…   1         
itherz/wordpress          WordPress                                       0         
wodby/wordpress           Vanilla WordPress container image               2         
s390x/wordpress           The WordPress rich content management system…   5         
spatialy/wordpress        WordPress + PHP Extensions                      0         
arm32v5/wordpress         The WordPress rich content management system…   0         
mips64le/wordpress        The WordPress rich content management system…   1

Let’s choose the first official WordPress that is bolded above. First, we can pull it on our server:

docker pull wordpress

Once it is downloaded, we can list to check the images:

docker images

You should get the following output:

[email protected]:~# docker images
IMAGE              ID             DISK USAGE   CONTENT SIZE   EXTRA
wordpress:latest   03e91f888c2b       1.06GB          272MB 

To install WordPress from the image file, we need to execute the following command:

docker run wordpress:latest &

This will run WordPress in the background, and to check the running container, we can use the command below:

docker ps -a

You should receive output similar to this:

[email protected]:~# docker ps -a
CONTAINER ID   IMAGE              COMMAND                  CREATED         STATUS         PORTS     NAMES
857b69ad767b   wordpress:latest   "docker-entrypoint.s…"   2 minutes ago   Up 2 minutes   80/tcp    thirsty_galois

This is OK, and Docker is running, but WordPress will not work, since there is no database. To make WordPress work, we need to run the command with another image for the database.

Let’s first pull the MySQL database image:

docker pull mysql:5.7

Then, we need to create a network for WordPress:

docker network create wp-network

Next is to run the MySQL image:

docker run -d \
  --name wp-mysql \
  --network wp-network \
  -e MYSQL_ROOT_PASSWORD=your_strong_password \
  -e MYSQL_DATABASE=wordpress \
  -e MYSQL_USER=wp_user \
  -e MYSQL_PASSWORD=wp_password \
  mysql:5.7

The docker ps -a command should give us this output:

[email protected]:# docker ps -a
CONTAINER ID   IMAGE       COMMAND                  CREATED          STATUS          PORTS                 NAMES
0d0f572def37   mysql:5.7   "docker-entrypoint.s…"   31 seconds ago   Up 29 seconds   3306/tcp, 33060/tcp   wp-mysql

Stop and remove the previous WordPress container first:

docker stop 857b69ad767b
docker rm 857b69ad767b

Now we can run the WordPress image again, and connect with the MySQL database container:

docker run -d \
  --name wp-app \
  --network wp-network \
  -p 80:80 \
  -e WORDPRESS_DB_HOST=wp-mysql:3306 \
  -e WORDPRESS_DB_USER=wp_user \
  -e WORDPRESS_DB_PASSWORD=wp_password \
  -e WORDPRESS_DB_NAME=wordpress \
  wordpress:latest

Now the docker ps -a command will give the following output with two containers:

[email protected]# docker ps -a
CONTAINER ID   IMAGE              COMMAND                  CREATED              STATUS              PORTS                                 NAMES
5d0911866abd   wordpress:latest   "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:80->80/tcp, [::]:80->80/tcp   wp-app
0d0f572def37   mysql:5.7          "docker-entrypoint.s…"   3 minutes ago        Up 3 minutes        3306/tcp, 33060/tcp                   wp-mysql

Wrap Up

That’s it. You successfully installed multiple Docker Images on Ubuntu 26.04.

If you have difficulties with this installation, our Linux admins will help you with any aspect. You need to sign up for one of our monthly server management or per-incident server support plans. Do not hesitate to contact us anytime. We are available 24/7.

If you liked this post about how to install Docker Images on Ubuntu 26.04, please share it with your friends or leave a comment below.

Leave a Reply

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