Skip to content

Relative bind mount issue. #293

Description

@Nemirtingas

Hi,

According to documentation https://dockhand.pro/manual/#stacks-import, bind mount relative volumes should work. In my tests, it didn't. I'd need some enlightenment.
Here is my setup:

dockhand in a compose in /mnt/.docker/dockhand/docker-composer.yml

services:
  dockhand:
    image: fnsys/dockhand:latest
    container_name: dockhand
    hostname: dockhand
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/.docker:/mnt/.docker
      - ./data:/app/data

Notice the /mnt/.docker is mounted on the same path in dockhand as host.

I've successfully adopted my minio stack :
/mnt/.docker/minio/docker-compose.yml
/mnt/.docker/minio/.env

Image

I've got the issue with the .env missing when starting the stack, but its a known issue fixed in #276 . I've created my .env in /app/data/stacks/server/minio/.env, now it can start, but dockhand starts it in /app/data/stacks/server/minio and not in /mnt/.docker/minio, and the bind mount is in this path. I can check that with docker inspect :

...
        "HostConfig": {
            "Binds": [
                "/app/data/stacks/server/minio/bin:/minio_bin:rw",
                "/app/data/stacks/server/minio/data:/data:rw"
            ],
...

I was thinking that the host would start the stack in the adopted directory, in fact /mnt/.docker/minio.

Is this expected behavior? Did I misconfigured something? Currently on 1.0.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready to gofixed, goes to the next release

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions