Ok, so I don't know the specifics, this might not be entirely accurate, but this is a general step-by-step guide for Debian based distros like Mint.
Install docker
The first thing you need to do is install docker, this can be done via whatever GUI you use for a package manager or via the terminal using sudo apt install docker
(I'm not sure docker is the name of the package, I'm just guessing, you can do an apt search docker
to see what's available)
Add yourself to dockers
This is likely not needed on Mint, but just in case your user should be in the docker group, i.e. run sudo gpasswd -a docker
. I'm almost sure Mint does this by default.
Enable docker systemd
This also might not be needed, again I'm almost sure Mint does this for you when you install docker, but just in case the command is sudo systemctl enable docker
Reboot
Because there have been changes to your user groups you need to relogin, easier to reboot.
use docker
Now you have a system with docker, you can test this by running the following command docker run hello-world
, if you see a bunch of text that contains "Hello from docker" docker is working.
setup a docker-compose file
Create a folder, and in that folder create a text file called docker-compose.yaml
in that file. This file will tell docker what you want to run, for example to have Nextcloud (which is an awesome self-hosted drive alternative. I'm not going to teach you the specific services you want, you can figure those out by looking at their page on the linuxserver page or something) you can look here https://hub.docker.com/r/linuxserver/nextcloud on how to write your docker-compose file, for example you could write:
services:
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
container_name: nextcloud
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- ./config:/config
- ./data:/data
ports:
- 8080:80
- 443:443
restart: unless-stopped
Then open a terminal on that folder and run docker compose up -d
after that is done open a browser and go to http://localhost:8080
and begin using Nextcloud.