I'm trying to take a config file and replace the already existing default.conf in nginx.
My super simple Docker compose:
version: '3.3'
services:
qwc-api-gateway:
image: nginx:1.19
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf
For convenience, I even published the two files here: https://github.com/Xentraxx/qwc-docker
The problem: If I try to build a stack from this repository in portainer, it fails with the error message:
Error response from daemon:
failed to create shim:
OCI runtime create failed:
runc create failed:
unable to start container process:
error during container init:
error mounting "/data/compose/7/default.conf" to rootfs at "/etc/nginx/conf.d/default.conf":
mount /data/compose/7/default.conf:/etc/nginx/conf.d/default.conf (via /proc/self/fd/6),
flags: 0x5001: 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
If I run docker-compose up -d
locally, the container starts and I can see in the logs that the default.conf has my desired values.
I couldn't find anything helpful for this online, only people saying that the source file probably doesn't exist. So feel free to take my repository, try to create a stack from it in Portainer and let me know what I am doing wrong. Because I have no idea anymore.
Also please ignore that the container crashes after it started. This is not related.