[GH-ISSUE #731] Error using docker-compose.yml #494

Closed
opened 2026-03-03 01:29:53 +03:00 by kerem · 2 comments
Owner

Originally created by @aaro-n on GitHub (Nov 17, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/731

Write the docker-compose.yml file according to the guide and there is an error at runtime.

Reference link

docker-compose.yml
`# docker-compose.yml
version: '3'

services:
bitwarden:
image: bitwardenrs/server:1.11.0
restart: always
volumes:
- ./bw-data:/data
environment:
WEBSOCKET_ENABLED: 'true' # Required to use websockets
SIGNUPS_ALLOWED: 'true' # set to false to disable signups

caddy:
image: abiosoft/caddy:1.0.3
restart: always
volumes:
- ./Caddyfile:/etc/Caddyfile:ro
- caddycerts:/root/.caddy
ports:
- 80:80 # needed for Let's Encrypt
- 443:443
environment:
ACME_AGREE: 'true' # agree to Let's Encrypt Subscriber Agreement
DOMAIN: 'XXX.XX.info' # CHANGE THIS! Used for Auto Let's Encrypt SSL
EMAIL: 'XX@gmail.com' # CHANGE THIS! Optional, provided to Let's Encrypt

volumes:
caddycerts:`

error code
`ERROR: for e620eeb1549d_bitwarden_caddy_1 Cannot start service caddy: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/home/www/bitwarden/Caddyfile\" to rootfs \"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged\" at \"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged/etc/Caddyfile\" 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 caddy Cannot start service caddy: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/home/www/bitwarden/Caddyfile\" to rootfs \"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged\" at \"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged/etc/Caddyfile\" 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.`

Originally created by @aaro-n on GitHub (Nov 17, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/731 Write the docker-compose.yml file according to the guide and there is an error at runtime. [Reference link](https://github.com/dani-garcia/bitwarden_rs/wiki/Using-Docker-Compose) docker-compose.yml `# docker-compose.yml version: '3' services: bitwarden: image: bitwardenrs/server:1.11.0 restart: always volumes: - ./bw-data:/data environment: WEBSOCKET_ENABLED: 'true' # Required to use websockets SIGNUPS_ALLOWED: 'true' # set to false to disable signups caddy: image: abiosoft/caddy:1.0.3 restart: always volumes: - ./Caddyfile:/etc/Caddyfile:ro - caddycerts:/root/.caddy ports: - 80:80 # needed for Let's Encrypt - 443:443 environment: ACME_AGREE: 'true' # agree to Let's Encrypt Subscriber Agreement DOMAIN: 'XXX.XX.info' # CHANGE THIS! Used for Auto Let's Encrypt SSL EMAIL: 'XX@gmail.com' # CHANGE THIS! Optional, provided to Let's Encrypt volumes: caddycerts:` error code `ERROR: for e620eeb1549d_bitwarden_caddy_1 Cannot start service caddy: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/home/www/bitwarden/Caddyfile\\\" to rootfs \\\"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged\\\" at \\\"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged/etc/Caddyfile\\\" 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 caddy Cannot start service caddy: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/home/www/bitwarden/Caddyfile\\\" to rootfs \\\"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged\\\" at \\\"/var/lib/docker/overlay2/15048d74523e124378cfa169f5ed1a50f6c71ee1a954227c26936c3a68b35dd5/merged/etc/Caddyfile\\\" 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.`
kerem closed this issue 2026-03-03 01:29:53 +03:00
Author
Owner

@nicokaiser commented on GitHub (Jan 19, 2020):

Did you ensure that ./bw-data and ./Caddyfile exist (on the host) and are files? Otherwise Docker creates these as folders...

<!-- gh-comment-id:576034180 --> @nicokaiser commented on GitHub (Jan 19, 2020): Did you ensure that `./bw-data` and `./Caddyfile` exist (on the host) and are files? Otherwise Docker creates these as folders...
Author
Owner

@dani-garcia commented on GitHub (May 13, 2020):

Closed due to inactivity.

<!-- gh-comment-id:628280795 --> @dani-garcia commented on GitHub (May 13, 2020): Closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#494
No description provided.