I’m trying to get a fresh installation of nextcloud working with docker and Portainer.
My choice is to install it using the fpm image because I have a Nginx Proxy in front of my installation, running on the same device.
I’m running all of this on a Raspi 4.
I created a directory at this location /home/leor/nextcloud
Inside I put two files :
The content of each file has been copied from the documentation here
I needed to manually create two directories (web and proxy) in order to be able to execute the command
docker-compose up -d
Then, it all started well but at one point, I get this error :
Status: Downloaded newer image for nextcloud:fpm-alpine
[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount3861733695/Dockerfile: no such file or directory
ERROR: Service 'web' failed to build : Build failed
I’m stuck here, I can’t find any answer on the internet to resolve this.
I hope to find useful help here.
If you need any information feel free to ask.
Nevermind, I resolved my issue by putting in the web and proxy folder two new files :
Where their content has been copied from docker/.examples/dockerfiles/full/fpm at master · nextcloud/docker · GitHub
Then the installation goes well.
I now have another problem with the proxy container
docker-compose up -d
nextcloud_redis_1 is up-to-date
nextcloud_db_1 is up-to-date
Starting nextcloud_proxy_1 ...
nextcloud_app_1 is up-to-date
nextcloud_cron_1 is up-to-date
Starting nextcloud_proxy_1 ... error
WARNING: Host is already in use by another container
ERROR: for nextcloud_proxy_1 Cannot start service proxy: driver failed programming external connectivity on endpoint nextcloud_proxy_1 (010c0573d22bc3103ff8a876963a1bcc42d92ae2f05cba1aed6ae513Recreating nextcloud_web_1 ... done
ERROR: for proxy Cannot start service proxy: driver failed programming external connectivity on endpoint nextcloud_proxy_1 (010c0573d22bc3103ff8a876963a1bcc42d92ae2f05cba1aed6ae51315b97bf1): Bind for 0.0.0.0:443 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
I’m still working on it, here is the result of the command :
sudo netstat -pna | grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1518/docker-proxy
tcp6 0 0 :::443 :::* LISTEN 1540/docker-proxy
unix 2 [ ACC ] STREAM LISTENING 36271 13076/containerd-sh /run/containerd/s/ec920680ff064f5b16dc4530877597e5d7d7361f5ccba357101e0787b63ca443
unix 3 [ ] STREAM CONNECTED 35766 13076/containerd-sh /run/containerd/s/ec920680ff064f5b16dc4530877597e5d7d7361f5ccba357101e0787b63ca443
Is there something wrong ?
I come back with news.
I find the origin of my problem. I didn’t used the right files to put in proxy and web folders.
You should use those from there :
At this point, I still got the same error but at least my files were correct.
Then, I changed the ports of nextcloud proxy in the docker-compose.yml file
Then everything started correctly. I assume the adress to access Nextcloud app should be http://hostIP:8081 but I get a 503 error for the moment.
Still looking for resolution.
I found what was wrong in my installation.
The files copied from the github were wrong again.
I saif I was using a nging proxy in front of my installation but I grab the files containing a proxy configuration : it messed up everything.
So I figured out that I needed those files
From insecure folder.
After tweaking a bit the docker-compose.yml file (specially removing 127.0.0.1 in front of the ports) i’m able to access Nextcloud installation page.
Thank’s to myself.