Docker
Docker is an awesome platform that anyone hoping to get into software / development or any homelab-er should become familiar with. Docker is a platform designed to help developers build, share, and run container applications. The most important aspect to docker is its ability to be implemented in version control via simple config files. This allowing a team of people to share a code base working in the same environments consistently.
Almost anything can be deployed as a service via docker. It is a fantastic tool to learn about apps, software, test operating systems, do things like home automation, run web servers, media servers, host your own proxy/reverse proxy, email, dns, network monitoring, websites etc.
Docker Environment Setup
I am doing things with Ubuntu, so for my case I will follow this docker.com - GUIDE for setting up the initial docker environment on my ubuntu machine and then running the test hello-world docker container app to verify that my docker environment is working.
- Set up Docker's apt repository.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
- Install the Docker packages.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Verify that the Docker Engine installation is successful by running the hello-world image.
Docker Compose
.env Files
Docker Files
Note
Example rebuild for this site