DEPRECATED - Only Tec-Knowledge - better don't user portainer ymls, don't use docker in root, don't create volumes like this, read https://obel1x.de/dokuwiki/doku.php?id=content:serverbasics:docker| before!
Note for english speakers: this is german as by time of writing i decided to do so. It's a working draft with hints but don't expect a full howto guide. Maybe i will write a new one including full flagged Server- Setup. Util then, this is all you will find here.
BTW: Two things to consider before reading this:
There is a big Problem with docker: The Daemon is running as root and also the Container- Services are. I am not a fried of this - so maybe you want to install Docker as non-root- user as wriztten here https://obel1x.de/dokuwiki/doku.php?id=content:serverbasics:docker and come back later.
Dies ist ein einfaches Setup. Nach der Installation von docker, kann folgendes gemacht werden.
Achtung: Docker.service und Containerd.service zusammen funktionieren NICHT ! Sollte Docker einfach nicht starten:
„Yes, that was the problem. Ran systemctl disable containerd
then rebooted and docker started as it should.“ Link
https://www.howtogeek.com/devops/how-to-get-started-with-portainer-a-web-ui-for-docker/
docker volume create portainer_data
docker run -d -p 81:9000 –name=portainer –restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
https://hub.docker.com/_/nextcloud
Ordner anlegen /opt/docker/nextcloud
https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf
herunterladen, abspeichern
docker-compose-yaml anlegen:
version: '2' volumes: nextcloud: db: services: db: image: mariadb:10.6 restart: always command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW volumes: - db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=D@xDarunt€rD@h3rG3p1@nt3n - MYSQL_PASSWORD=L3g7J€we1ligenR€@g1ert€ltern - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud app: image: nextcloud:fpm restart: always links: - db volumes: - nextcloud:/var/www/html environment: - MYSQL_PASSWORD=L3g7J€we1ligenR€@g1ert€ltern - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=db web: image: nginx restart: always ports: - 8080:80 links: - app volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro volumes_from: - app
Start mit
docker-compose up -d