Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission issue with docker compose up #688

Open
zydisney opened this issue Apr 2, 2024 · 5 comments
Open

permission issue with docker compose up #688

zydisney opened this issue Apr 2, 2024 · 5 comments

Comments

@zydisney
Copy link

zydisney commented Apr 2, 2024

nats-1           | nats-server: read /config/gnatsd.conf: is a directory
nats-1           | nats-server: read /config/gnatsd.conf: is a directory
nats-1           | nats-server: read /config/gnatsd.conf: is a directory
spreedbackend-1  | Preparing signaling server configuration in /config/server.conf ...
spreedbackend-1  | cp: can't create '/config/server.conf/server.conf.in': Permission denied
spreedbackend-1  | Preparing signaling server configuration in /config/server.conf ...
spreedbackend-1  | cp: can't create '/config/server.conf/server.conf.in': Permission denied

I got this issue when use sudo docker compose up to start the container. How should I fix it?

@klatka
Copy link

klatka commented Apr 6, 2024

  1. remove dirs docker/server.conf and docker/gnatsd.conf
  2. copy server.conf and gnatsd.conf into docker/

@zydisney
Copy link
Author

zydisney commented Apr 6, 2024

  1. remove dirs docker/server.conf and docker/gnatsd.conf
  2. copy server.conf and gnatsd.conf into docker/

I copy server.conf and gnatsd.conf (which are files) to docker/
The new error appears. It seems require gnatsd.conf to be a folder.

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 "/home/aaron/nextcloud-spreed-signaling/docker/gnatsd.conf" to rootfs at "/config/gnatsd.conf": mount /home/aaron/nextcloud-spreed-signaling/docker/gnatsd.conf:/config/gnatsd.conf (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

If I don't copy gnatsd.conf to docker/, docker compose up will create a gnatsd.conf dir. After that, error:

nats-1           | nats-server: read /config/gnatsd.conf: is a directory 

@fancycode
Copy link
Member

Which OS / version of Docker is this? The steps described by @klatka should work fine, just tested this here myself.

@Waldhonig01
Copy link

Hello everyone,

I'm facing the same problem and have already tried everything possible. Every time if i start “docker compose up” a folder is created instead of a file.
I am using Docker Compose version v2.29.1 on Ubuntu 22.04.4 LTS
Have everyone an idea ?

@Chrysocyon1
Copy link

Chrysocyon1 commented Nov 12, 2024

Hi,

I had this issue because my docker compose was lower than the version mentioned here.
https://github.com/strukturag/nextcloud-spreed-signaling/blob/master/README.md#docker-compose

Please note that docker-compose v2 is required for building while most distributions will ship older versions.
You can download a recent version from https://docs.docker.com/compose/install/

Docker and docker-compose are different tools. I checked my docker compose version with docker compose version .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants