Skip to main content

Update #16 - Installing Docker and Prepping My VPS for App Expandability.

Date: May 23, 2025
Category: Server Management / DevOps
Backlink: N/A (First Entry in Docker Expansion Series)


My objective was to get Docker up and running on my existing VPS without migrating BookStack (yet). I wanted to ensure I could containerize and run additional apps while keeping BookStack fully operational, with no downtime during this transition. This setup gives me the flexibility to explore other projects in isolated environments while preserving my current production setup.

 

I'll run apt update to make sure my packages are updated.

sudo apt update

image.png

I also used app auto-remove to get rid of some old PHP packages:

sudo apt autoremove

image.png

So to install Docker, we need to build our app source line step-by-step.

Getting my system architecture:

dpkg --print-architecture

image.png

So I see it is amd64

I'll also need to get my Ubuntu Codename:

lsb_release -cs

image.png

So I see it is jammy

Now I can construct the Docker source line manually:

echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable"

This code below writes it into the APT sources list at /etc/apt/sources.list.d/docker.list

echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Now we can update the packages:

sudo apt update

I got an error like this:

image.png

So I need to re fetch and add Docker's GPG Key Securely:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
  sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Then enure it is readable by APT:

sudo chmod a+r /etc/apt/keyrings/docker.gpg

Then update the package list again:

sudo apt update

Proceed with installing Docker:

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

This installs the docker engine, CLI Tools, Container runtime,, and Docker Compose plugin (V2)

dcb30c35-07c0-45cb-b6e3-2cd33c200254.png

I left both services checked for restart and verified everything is installed.

image.png

I'm now ready to use docker for some of my other projects and also didn't bring down the Bookstack at all while doing this.