For this installation, we need the following prerequisites:
Lets start
mkdir docker -p && mkdir docker/webtop -p && cd docker/webtop && mkdir config
Now via Portainer or docker-compose CLI, you can create your stack by using the YML file with the content as below:
---
version: "2.1"
services:
webtop:
image: lscr.io/linuxserver/webtop:ubuntu-mate
container_name: webtop
privileged: true
security_opt:
- seccomp:unconfined #optional
environment:
- PUID=1000
- PGID=1000
- TZ=America/Toronto
- SUBFOLDER=/ #optional
- TITLE=Webtop #optional
- CUSTOM_USER=milootech
- PASSWORD=P@ssw0rd!
volumes:
- /root/docker/webtop/config/:/config
- /var/run/docker.sock:/var/run/docker.sock #optional
ports:
- 3000:3000
- 3001:3001
devices:
- /dev/dri:/dev/dri #optional
shm_size: "2gb" #optional
restart: unless-stopped
* When using volumes (-v
flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID
and group PGID
.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance PUID=1000
and PGID=1000
, to find yours use id user
as below:
$ id
#uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
If you are using the Portainer stack hit deploy or if you are using docker-compose use below command:
docker-compose up -d
Don't forget this is a lightweight Linux; you should install anything you want and even update this machine from inside like a virtual machine. Also don't forget if you update this container like others, you will lose all the things you changed inside the container instead of the home folder and the documents folder. If you want to update or install anything inside, please work with like a virtual machine as I mentioned.
The default username would be "abc", or if you use custom username in your YML file as a environment you can use that for login.
For example:
sudo apt update
sudo apt upgrade
sudo apt install vlc
sudo apt install libreoffice
sudo apt install iputils-ping
sudo apt install dnsutils
For more information please click here.
Good luck…