Docker 20.10 on Devuan 4: Install and Run container

Table of contents

Summary Summary

This post shows how to install Docker (opens in a new tab) and run vm on Devuan (opens in a new tab), a systemd (opens in a new tab)-free fork of Debian (opens in a new tab).

Environment Environment

Tutorial Tutorial

All doas (opens in a new tab) from OpenBSD’s (opens in a new tab) can be replaced with sudo (opens in a new tab).

Install package Install package

Just run:

console
$ doas apt install docker-compose

Configure user Configure user

It is necessary to use Docker without sudo.

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

Then reboot your machine. Now you are ready.

Get container image Get container image

For example:

console
$ docker pull mariadb

Create container Create container

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

console
$ docker volume create mariadb-dev

Well, run docker run:

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

Work with your vm 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 Conclusion

As to Podman (opens in a new tab), which can be alternative to Docker, it is available, too, whose version is, however, 3 (opens in a new tab) on current Devuan although the latest is 4 (opens in a new tab).

🌱 🤖 Happy virtualization 🤖 🎶

More on: Containers and virtual machines

Scqr [secureal]

Scqr [secureal]: the engineering practice of Reflerd Inc. (opens in a new tab)

Comments and feedback are welcome.