Cheap Home LAN Playground Using Docker - s1/7


Series Top: Dockerで作るおうちLAN遊び場


I would like to post a blog series on my home LAN playground that runs various services using Docker. The intended audience is someone interested in trying out Docker to test out different services, GitLab (GitLab Runner and GitLab Pages as well), and someone who wants to do scripting and programming using these services.

You can try many of the things covered in this blog series using less than 20k JPY mini fanless PC. My first machine has 4G memory. My second machine running GitLab has 16G memory as it is a bit more demanding, but 8G memory should be enough for you if you are going to run just the services covered in this series.

What I really have is my paid public DNS domain name and TLS certificate signed by a public CA, but in this series I will just use a private domain, private CA, and self-signed certificate so that you can follow the steps without purchasing your own DNS domain.

End-state Illustration

Here is the illustration of what I will have at the end of this series. All of the services illustrated here will be running as Docker containers.

Docker Containers

Here is the list of services I will cover, and I will list the docker image names actually used in each blog entry.

  • DNS
  • Jupyter Notebook
  • GitLab
  • GitLab Runner
  • Nginx
  • Authelia

Machine Setup

Preparing a machine (or two if creating a complete mirror) with docker and docker compose installed should be fine to follow procedures explained in the following posts. Just to share my environment, I use Debian starting with minimal install, ssh server enabled, and no desktop service, running in headless, and here are some generic settings I configured.


I think Ubuntu has sudo setup for the initial user created. In case with Debian, I have to manually install and setup for my usual user ID.

su -
apt install sudo
gpasswd -a {your username} sudo

IP Address

I configure static IP address for this machine by editing the configuration file, sudo vi /etc/network/interfaces. In this example, the interface name is enp2s0, IP address for this machine is, and the network gateway is

# The primary network interface
allow-hotplug enp2s0
#iface enp2s0 inet dhcp
iface enp2s0 inet static


Edit DNS configuration file (sudo vi /etc/resolv.conf) to configure which DNS server to use. I will be setting up DNS server using Docker later. Until that's available, I can configure the nameserver to be something that my ISP is providing, or something Cloudflare or Google is providing, or

options rotate


The procedure to install Docker is available in the official document. The one I'm refering here is for Debian but the documentation for other OS is also available in the official document.



Install requirements.

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \

Add gpg key.

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Set "stable" package to use.

echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install docker and add user to the docker group.

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo groupadd docker
sudo usermod -aG docker $USER


And this is it for the first post. In the next post, I will be running DNS server and Jupyter Notebook using Docker.

next: DNS and Jupyter Notebook Using Docker