Docker 20.10 on Devuan 4: Install and Run container

nabbisen - Aug 7 '23 - - Dev Community

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
Enter fullscreen mode Exit fullscreen mode

Configure user

It is necessary to use Docker without sudo.

$ doas /usr/sbin/usermod -a -G docker ${MY_USER}
Enter fullscreen mode Exit fullscreen mode

Then reboot your machine. Now you are ready.

Get container image

For example, get the official MariaDB image:

$ docker pull mariadb
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Well, run docker run:

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

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 🤖 🎶

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .