Bitwarden Runs Inside A Docker Container

Docker is an open-source application that allows us to create miniature virtual machines, called 'containers', on our server. In these containers, we can run different software and services in isolation from the rest of our server.

We will be running Bitwarden in its own container. Up until now, self-hosting Bitwarden involved eleven different Docker containers, and thus was a heavy load for a small server to bear.

With Bitwarden Unified, this has all been simplified into one Docker Container.

Let's get Docker installed so we can get Bitwarden up and running!

Setting Up An Official Docker Repository

First, run the following command to update our apt package index.

sudo apt-get update

Then run this command to install the packages we'll need to set up our Docker Repository.

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

Now create a directory to store Docker's official GPG key:

sudo mkdir -p /etc/apt/keyrings

Then add their official GPG key to that directory:

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

Next use the following command to set up the 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

For more information on this installation process, you can visit Docker's Official Installation Guide.

We now have Docker's official repository all set up. In the next lesson, we'll install Docker Engine!

by: