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

Getting 'flags0x5000: not a directory' when using docker #944

Open
2 of 10 tasks
masiv1001 opened this issue Mar 5, 2024 · 1 comment
Open
2 of 10 tasks

Getting 'flags0x5000: not a directory' when using docker #944

masiv1001 opened this issue Mar 5, 2024 · 1 comment
Labels

Comments

@masiv1001
Copy link

masiv1001 commented Mar 5, 2024

Iris version

:latest :master

Operating system(s) affected

  • Windows
  • MacOS
  • iOS
  • Android
  • Linux
  • Other

Browser(s) affected

  • Firefox
  • Chrome
  • Edge
  • Other

What happened?

I'm getting the following error when trying to deploy the docker container both standalone with docker compose up and withing Portainer. I suspect it has to do with the files being directly linked in the volumes area, but trying to create them manually and add them later (as directories, or as files) only resulted in non-working setups.

Here's my docker-compose file, the other two files (mopidy.conf, snapserver.conf) were created with default config in their respective directories.
I changed the branch to master, container names and music directory just in case but nothing worked.

version: "3"
services:
  snapserver:
    container_name: snapppppserver
    image: jaedb/snapserver:master
    depends_on:
      mopidy:
        condition: service_healthy
    ports:
      - 1704
      - 1705
      - 1780
    volumes:
      - /tmp/snapserver:/tmp
      - ./docker/snapserver/snapserver.conf:/etc/snapserver.conf
      - ./docker/snapserver/snapserver.json:/root/.config/snapserver/server.json
  mopidy:
    container_name: irissssssss
    image: jaedb/iris:master
    environment:
      - PIP_PACKAGES=Mopidy-YTMusic Mopidy-Tidal Mopidy-SoundCloud Mopidy-MusicBox-Webclient
    ports:
      - 6600
      - 6680
    healthcheck:
      test: curl -f http://localhost:6680/iris/http/get_config || exit 1
      timeout: 5s
      retries: 5
    volumes:
      # - ./mopidy/iris:/iris/mopidy/iris # To use a locally-built UI 
      - ./docker/mopidy/iris:/var/lib/mopidy/iris # Iris-specific storage
      - ./docker/mopidy/m3u:/var/lib/mopidy/m3u # To persist local playlists
      - ./docker/mopidy/mopidy.conf:/config/mopidy.conf
      - ./music:/var/lib/mopidy/media
      - /tmp/snapserver:/tmp

Logs

[redacted]@[redacted]:/mnt/docker/containers/music-server$ sudo docker compose up
[+] Running 2/0
 ✔ Container irissssssss     Created                                                                                                                 0.1s 
 ✔ Container snapppppserver  Created                                                                                                                 0.0s 
Attaching to irissssssss, snapppppserver
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 "/mnt/docker/containers/music-server/docker/mopidy/mopidy.conf" to rootfs at "/config/mopidy.conf": mount /mnt/docker/containers/music-server/docker/mopidy/mopidy.conf:/config/mopidy.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
@masiv1001 masiv1001 added the bug label Mar 5, 2024
@masiv1001
Copy link
Author

I've successfully got it working by first creating both the folders and files and attaching them as folders with the proper file contents (server.json, mopidy.conf & snapserver.conf), the contents of server.json I just copy pasted the ones of snapserver.conf.
Note that even this setup might work, it requires extra setup on the end user and potentially introduces a security risk (or at least unnecessary file exposure) by exposing such folder's content. It also prevents the automatic deployment with just the use of docker.

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

No branches or pull requests

1 participant