DEV Community

nabbisen
nabbisen

Posted on β€’ Originally published at scqr.net

3 1 1

Docker 20.10 on Devuan 4: Install and Run container

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 πŸ€– 🎢

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay