Themes: Data Ownership, Server
Status: 🌱
Tags: resource
Docker Installation
Docker
Docker is a containerization platform that allows self-hosted applications to run in isolated environments called containers. It makes deploying, managing, updating, and backing up self-hosted applications much easier. It does not include a graphical interface and is primarily administered through terminal commands.
- Using the terminal in VS Code, install the prerequisites using the following command
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings Command Breakdown
sudo apt updateUpdates the list of available software.sudo apt install ca-certificates curlInstalls tools for secure downloads.sudo install -m 0755 -d /etc/apt/keyringsCreates a folder for software security keys.
- Add the Docker GPG key
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 Command Breakdown
sudo curl ...Downloads Docker’s security key and saves it to the system.sudo chmod a+r ...Allows all users to read the Docker security key.
- Add Docker repository
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF - Install Docker
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - Verify Docker installation was successful
docker --version
sudo docker run hello-worldFolder Structure
Folder Structure
Maintaining a neat folder structure helps tremendously when it comes to problem-solving and server backups. This folder structure will be essential as you expand your server in the future.
- Click the add folder icon in the explorer column
- Name the folder “docker”
- Navigate to the folder by entering the following into the terminal
cd docker
code .Command Breakdown
cd dockerMoves into the docker folder.code .Opens the current folder in Visual Studio Code.
- Create a new folder in the docker folder named “npm”
- NGINX Proxy Manager container
- Create a new folder in the docker folder named “actual”
- Actual Budget container
The directory structure should look like this:
/home/username/docker/
├── actual/
└── npm/
Back Matter
Next Step: NGINX Installation
Previous Step: Visual Studio Code Installation
Parent Page: Home Server Build Guide