qwc-services / qwc-docker

Docker containers for qwc-services
MIT License
48 stars 36 forks source link

Error on windows during container creation of qwc-docker_qwc-api-gateway_1 #41

Closed Revo2022 closed 2 years ago

Revo2022 commented 2 years ago

Following output is given after I've entered docker-compose up -d

Creating qwc-docker_qwc-api-gateway_1             ... error

ERROR: for qwc-docker_qwc-api-gateway_1  Cannot start service qwc-api-gateway: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/run/desktop/mnt/host/c/qwc/qwc-docker/api-gateway/nginx.conf" to rootfs at "/etc/nginx/conf.d/default.conf" caused: mount through procfd: 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 qwc-api-gateway  Cannot start service qwc-api-gateway: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/run/desktop/mnt/host/c/qwc/qwc-docker/api-gateway/nginx.conf" to rootfs at "/etc/nginx/conf.d/default.conf" caused: mount through procfd: 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.

Any possibility to fix it for windows? I think it's about the usage of volumes and absolute paths

GetBack2Basics commented 2 years ago

I am seeing the same issue on Ubuntu 20.04 as well but only when using https://qwc.sourcepole.com/quick-start/ instructions. I was able to use a docker tar from the previous day to get this working.

rodrigoherenio commented 2 years ago

I had the same problem on Windows. It happened because I forgot to create a copy of the nginx-example.conf file as nginx.conf inside the api-gateway folder. So I followed these steps:

  1. Delete docker containers and volumes.
  2. Inside the api-gateway folder, create a copy with the nginx-example.conf file as nginx.conf.
  3. Run docker-compose up -d
HusseinKabbout commented 2 years ago

I cannot reproduce this error. But from the error message it seems that /run/desktop/mnt/host/c/qwc/qwc-docker/api-gateway/nginx.conf does not exist or could not be mounted.

I had the same problem on Windows. It happened because I forgot to create a copy of the nginx-example.conf file as nginx.conf inside the api-gateway folder

This might be a good hint. @Revo2022 maybe you just forgot to create the nginx.conf file?

Also there have been quite some changes since January, please check out the updated documentation.

Closing this issue, as it is not directly related to the docker-compose configuration, but the docker environment. If your issue still persists with the latest version, then please open a new issue.