You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a docker compose and a Caddyfile. The CaddyFile is in the same path as the docker-compose file
When i try create container in portainer using git repo, i receive error
Deployment error
failed to deploy a stack: Network winrardockerrepo_network_default Creating Network winrardockerrepo_network_default Created Container caddy Creating Container caddy Created Container caddy Starting Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/data/compose/49/Network/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /data/compose/49/Network/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: 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
Moving Caddyfile into a sub-folder and reflecting in docker-compose results in same error.
Deploying this docker-compose via git-clone and docker compose up --build directly on my host works fine. This issue is only occurring in Portainer.
Expected Behavior
Container should be deplorable in entertainer
Actual Behavior
Fill in Create Stack details using git repo. I already have multiple containers working from this repo.
Click "Deploy this stack "
Error thrown
Deployment error
failed to deploy a stack: Network winrardockerrepo_network_default Creating Network winrardockerrepo_network_default Created Container caddy Creating Container caddy Created Container caddy Starting Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/data/compose/49/Network/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /data/compose/49/Network/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: 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
Steps to Reproduce
See attached example docker-compose.yml. You will need a generic Caddyfile.
Definitely seems like a bug of some kind. I had the same problem and like Sprooty I eventually had to just run from the host command line. Identical setup but it could not run from inside portainer. Failed on the Caddyfile
Before you start please confirm the following.
Problem Description
Moving Caddyfile into a sub-folder and reflecting in docker-compose results in same error.
Deploying this docker-compose via git-clone and docker compose up --build directly on my host works fine. This issue is only occurring in Portainer.
Expected Behavior
Container should be deplorable in entertainer
Actual Behavior
Steps to Reproduce
See attached example docker-compose.yml. You will need a generic Caddyfile.
Portainer logs or screenshots
version: '3.7' services: caddy: image: iarekylew00t/caddy-cloudflare:latest container_name: caddy ports: - 80:80 - 443:443 volumes: - ./Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data - caddy_config:/config environment: - CF_API_TOKEN=XXXXXXXXXXXXXXXXXXXX volumes: caddy_data: caddy_config:
Portainer version
2.19.4
Portainer Edition
Community Edition (CE)
Platform and Version
Docker version 20.10.23, build 7155243 Docker Compose version v2.24.1
OS and Architecture
Ubuntu 22.04
Browser
Firefox
What command did you use to deploy Portainer?
docker volume create portainer_data # docker run -d --name=portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data -e PGID=1000 -e PUID=1000 -p 9000:9000 -p 2375:2375 portainer/portainer-ce:latest
Additional Information
No response
The text was updated successfully, but these errors were encountered: