Pirates are evil? The Marines are righteous? These terms have always changed throughout the course of history! Kids who have never seen peace and kids who have never seen war have different values! Those who stand at the top determine what's wrong and what's right! This very place is neutral ground! Justice will prevail, you say? But of course it will! Whoever wins this war becomes justice! - Donquixote Doflamingo • Pirates are evil? The Marines are righteous? These terms have always changed throughout the course of history! Kids who have never seen peace and kids who have never seen war have different values! Those who stand at the top determine what's wrong

Docker is a tool that makes it easy to run applications in isolated environments called containers.

Think of it like this:
📦 A container is like a “portable box” that has everything an app needs to run (code, libraries, dependencies).
🚢 Docker is the system that builds, runs, and manages these boxes.

Why use Docker?

Works everywhere – Runs the same on your PC, server, or cloud.
No “it works on my machine” issues – Everything is inside the container.
Lightweight & fast – Uses less space than virtual machines.

  • Stop and Remove the Old Container:
sudo docker stop remark42 && sudo docker rm remark42
  • Recreate and Start the Container with the Updated docker-compose.yml:
sudo docker-compose up -d
  • Check if the New Container is Running:
sudo docker ps

Installation

I chose to go with the docker engine rather than Docker Desktop for Linux because I’m using this to deploy a server and I don’t need Kubernetes and all that extra stuff. Additionally, Docker Desktop for Linux runs in a VM, while the engine runs locally (I think).

Using the apt Repository

Run the following command to uninstall all conflicting packages:

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
  1. Set up Docker’s apt repository.

    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    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
     
    # Add the repository to Apt sources:
    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
      $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
  2. Install the Docker packages.

    Latest Specific version


    To install the latest version, run:

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

  1. Verify that the installation is successful by running the hello-world image:

    sudo docker run hello-world

1

Docker Compose

Installation

  1. Update the package index, and install the latest version of Docker Compose:

    • For Ubuntu and Debian, run:

      $ sudo apt-get updatesudo docker stop remark42

sudo docker rm remark42

    $ sudo apt-get install docker-compose-plugin
    ```
    
- For RPM-based distributions, run:
    
    ```console
    $ sudo yum update
    $ sudo yum install docker-compose-plugin
    ```
    

2. Verify that Docker Compose is installed correctly by checking the version.

```console
$ docker compose version
```

Expected output:

```text
Docker Compose version vN.N.N
```

Where `vN.N.N` is placeholder text standing in for the latest version.

Update Docker Compose

To update the Docker Compose plugin, run the following commands:

  • For Ubuntu and Debian, run:
sudo apt-get update
sudo apt-get install docker-compose-plugin
  • For RPM-based distributions, run:
sudo yum update
sudo yum install docker-compose-plugin

Footnotes

  1. https://docs.docker.com/engine/install/ubuntu/