Docker 20.10 on Devuan 4: Install and Run container

@nabbisen

Series


Summary

This post shows how to install Docker and run vm on Devuan, a systemd-free fork of Debian.

Environment

Tutorial

All doas from OpenBSD’s can be replaced with sudo.

Install package

Just run:

$ doas apt install docker-compose

Configure user

It is necessary to use Docker without sudo.

$ doas /usr/sbin/usermod -a -G docker ${MY_USER}

Then reboot your machine. Now you are ready.

Get container image

For example:

$ docker pull mariadb

Create container

It is optional. In case of MariaDB, files in the specific path should be stored in volume to be permanent:

$ docker volume create mariadb-dev

Well, run docker run:

$ docker run \
      --name mariadb-dev \
      -v mariadb-dev:/var/lib/mysql \
      -e MARIADB_ROOT_PASSWORD=${DB_SECRET} \
      -d \
      mariadb:latest

Work with your vm

You will be able to connect to your database 😉 with:

  • host = localhost
  • port = 3306
  • db user = root
  • db password = ${DB_SECRET}

Conclusion

As to Podman, which can be alternative to Docker, it is available, too, whose version is, however, 3 on current Devuan although the latest is 4.

🌱 🤖 Happy virtualization 🤖 🎶

Series

docker
  1. Docker 19.03 without sudo
  2. Docker 20.10 on Devuan 4: Install and Run container

Comments or feedbacks are welcomed and appreciated.