Install docker either from your OS's package repositories

sudo apt install docker.io

or check out https://docs.docker.com/engine/installation/linux/. If you have a Debian-based host system, you could run apt-cacher-ng and sbuild on your host system, but otherwise you need to install them inside the container.

Docker with Debian-based host

Pull the development docker image that FSCI provides

docker pull registry.gitlab.com/fsci/resources:debian-dev

Create a container with it and run bash on it

docker run --privileged --name "sid" -it registry.gitlab.com/fsci/resources:debian-dev bash

If needed, update and upgrade to latest versions of packages

apt-get update && apt-get upgrade

Create a normal user for packaging. See https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-debian-8

Exit after your work is done. If you need to connect to it later, use the following commands which will take you to the bash prompt

docker start sid
docker attach sid

Docker with non-Debian-based host

If your host system is not Debian-based (for example arch), then you can follow the steps below (this will setup docker with systemd integration which allows you to run services like apt-cacher-ng easily),

docker pull jgoerzen/debian-base-standard:sid
docker run -td --stop-signal=SIGRTMIN+3 \
   --tmpfs /run:size=100M --tmpfs /run/lock:size=100M \
   -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
   --name=debian-sid jgoerzen/debian-base-standard:sid

You can start the container and get an interactive shell

docker start debian-sid
docker exec -it debian-sid bash

Setup apt-cacher-ng (this will cache all the packages locally) and auto-apt-proxy (this will auto configure the installed proxy for apt).

apt install apt-cacher-ng auto-apt-proxy

auto-apt-proxy command should display http://172.17.0.1:3142 upon successful setup.

You will now get a root shell and it is better to create a normal user for packaging.

Now run this inside the container,

adduser <username>
su - <username>

Applications that support Docker build environments

Please update as needed.

Dedicated User Environment (DUE)

DUE is a wrapper for Docker that configures and runs containers from user selected releases. In addition to making common build and configuration tasks easier, it automatically maps the user's account and home directory to be available in the container, creating a more comfortable work environment.

To install from Debian 11 Bullseye:

sudo apt-get install due

For earlier Debian releases, source code and packaged .debs are available at the project's home page, here: https://github.com/cumulusnetworks/DUE