Installing Docker on a one.com VPS

Docker is a reliable way to run applications in isolated containers, and setting it up on a One.com VPS is straightforward once you know the steps. This guide shows you how to install Docker on Ubuntu in this environment, so you can get started quickly and with confidence.

Note: one.com does not provide support for Docker installations or related issues. If you choose to install Docker on your VPS, you are responsible for setup, configuration, and maintenance.


Requirements

  • A one.com VPS installed
  • SSH access to the VPS
  • A non-root user with sudo privileges

Step 1 - Update your package index

Log in to your VPS via SSH.
Run:

sudo apt-get update

Step 2 - Uninstall old versions (if any)

If there are remnants of previous Docker installs, remove them:

sudo apt-get remove docker docker-engine docker.io containerd runc

Step 3 - Install required packages

These packages allow apt to use repositories over HTTPS:

sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

Step 4 - Add Docker’s official GPG key

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

Step 5 - Set up the Docker repository

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Step 6 - Install Docker Engine

Update apt again and install Docker:

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

Step 7 - Verify installation

Check that Docker is working:

sudo docker run hello-world

If you see a confirmation message, Docker is ready on your VPS.

When done, it should look like this in your SSH terminal:
Screenshot of the SSH-terminal, showing how it will look like if installed correct.


What's next?

Docker is now installed on your one.com VPS. So what’s next? 

Head to Docker Hub to browse official images, or follow the instructions to pull the images you need and start building your project.


Related articles:

Was this article helpful?

Can’t find what you are looking for?

Start a chat

It's the quickest way to get in touch, every day of the year.

Give us a call

Available on weekdays from 10am to 2pm (UTC).