Hello, I’m new to docker and find it quite hard to learn…I am currently trying to setup nextcloud with mysql but am also adding nginx-reverse proxy and letsencrypt because I am not sure how to modify the .yml file.The guide I’m following: https://blog.ssdnodes.com/blog/installing-nextcloud-docker/
The error:
nextcloud-proxy is up-to-date
Starting nextcloud-mariadb …
Starting nextcloud-mariadb … error
ERROR: for nextcloud-mariadb Cannot start service db: OCI runtime create failed: container_linux.go:346: starting container process caused “process_linux.go:449: container init caused “rootfs_linux.go:58: mounting \”/etc/localtime\” to rootfs \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged\" at \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged/usr/share/zoneinfo/UCT\" caused \“not a directory\”"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: for db Cannot start service db: OCI runtime create failed: container_linux.go:346: starting container process caused “process_linux.go:449: container init caused “rootfs_linux.go:58: mounting \”/etc/localtime\” to rootfs \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged\" at \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged/usr/share/zoneinfo/UCT\" caused \“not a directory\”"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
The .yml file:
version: ‘3’
services:
proxy:
image: jwilder/nginx-proxy:alpine
labels:
- “com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true”
container_name: nextcloud-proxy
networks:
- nextcloud_network
ports:
- 80:80
- 443:443
volumes:
- ./proxy/conf.d:/etc/nginx/conf.d:rw
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
- ./proxy/html:/usr/share/nginx/html:rw
- ./proxy/certs:/etc/nginx/certs:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: unless-stopped
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nextcloud-letsencrypt
depends_on:
- proxy
networks:
- nextcloud_network
volumes:
- ./proxy/certs:/etc/nginx/certs:rw
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
- ./proxy/html:/usr/share/nginx/html:rw
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
db:
image: mariadb
container_name: nextcloud-mariadb
networks:
- nextcloud_network
volumes:
- db:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_PASSWORD=example
- MYSQL_DATABASE=cloudnext
- MYSQL_USER=nextcloud
restart: unless-stopped
app:
image: nextcloud:latest
container_name: nextcloud-app
networks:
- nextcloud_network
depends_on:
- letsencrypt
- proxy
- db
volumes:
- nextcloud:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html
- ./app/config:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/config
- ./app/custom_apps:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/custom_apps
- ./app/data:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/data
- ./app/themes:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/themes
- /etc/localtime:/etc/localtime:ro
environment:
- VIRTUAL_HOST=nextcloud.pc.local
- LETSENCRYPT_HOST=nextcloud.pc.local
- LETSENCRYPT_EMAIL=example@mydomain.hr
restart: unless-stopped
volumes:
nextcloud:
db:
networks:
nextcloud_network:
If possible I don’t need the reverse proxy or letsencrypt