Problem Statement:

I need an easy way to create builds for multiple linux distribtuions.

Solution:

Create a CentOS build server with Docker. This will allow me to easily support any number of linux distributions by importing any target OS as a new image.

Step one: Installing Docker to CentOS

Note: We're doing it the more manual way.

  1. Find the version of CentOS you’re using by running: cat /etc/os-release
  2. Navigate to https://download.docker.com/linux/centos/ and select the OS that matches the output from above. For me it was CentOS 9
  3. Next we need the following 5 downloads
    1. containerd.io
    2. docker-ce
    3. docker-ce-cli
    4. docker-buildx-plugin
    5. docker-compose-plugin
  4. Install the packages that we just downloaded.
        cd ~/Downloads
        sudo dnf install ./containerd.io-1.7.23-3.1.el9.x86_64.rpm \
        ./docker-ce-27.3.1-1.el9.x86_64.rpm \
        ./docker-ce-cli-27.3.1-1.el9.x86_64.rpm \
        ./docker-buildx-plugin-0.17.1-1.el9.x86_64.rpm \
        ./docker-compose-plugin-2.6.0-3.el9.x86_64.rpm
    

Step two: Configure Docker to not require sudo

  1. Create a docker group on CentOS build server.
      sudo groupadd docker
    
  2. Add user to the newly created docker group
      sudo usermod -aG docker bob-the-builder 
    

Step three: Configure Docker to start on boot

  1. I honestly cant remember if docker automatically starts on boot or not, but enabling it twice can’t hurt.
      sudo systemctl enable docker.service
      sudo systemctl enable containerd.service
    

Step four: Profit