Skip to content

Device Bind Mount Disconnecting from Container Directory #6317

Closed
@keith-gamble

Description

@keith-gamble

I primarily do my development in networks setup by compose files, where I map a specific local folder into a specific folder on my container. I have noticed recently that I am having an issue consistently where after a short period of time my container will stop receiving the changes for files located inside the mount.

Here is how my compose file is setup:

version: "3"

services:
    frontend:
        image:           inductiveautomation/ignition:8.1.16
        container_name:  frontend
        ports:
        - "80:8088"
        volumes:
        - project_data:/usr/local/bin/ignition/data

volumes:
    project_data:
        driver: local
        driver_opts:
            type: none
            device: "myProjectPath/Data"
            o: bind

At first everything looks fine and works, however after a while I can make changes in VS Code on my Mac directly:
(Note the extra folders)

├── views
│   ├── Gemba Boards
│   │   ├── Blends
│   │   ├── Embedded Views
│   │   ├── Filter
│   ├── General

That do not make their way into the container if I actually attach to it to look at its file contents

├── views
│   ├── Gemba Boards
│   │   ├── Blends
│   ├── General

Potentially relevant note is that I am also using git, and this typically happens when I am switching between git branches. So it may be something to do with the large amount of files being changed at once?

Restarting the container does not resolve this issue, however completely restarting Docker Desktop does (Which I am pretty sure is also restarting the engine, so I am not sure which thing is fixing this.)

MacOS Version: Monterey 12.4 (Intel)
Docker Desktop Version: 4.8.1 (78998)
Docker Engine Version: 20.10.14
Compose: v2.5.0

Any ideas are greatly appreciated! And if the solution is for me to post this somewhere else, that's appreciated too!

I also posted this on the forums for reference (Not sure which place was correct!): https://forums.docker.com/t/device-bind-mount-disconnecting-from-container-directory/124525
As well as the image providers forums: https://forum.inductiveautomation.com/t/docker-bind-mount-disconnecting-from-container/59554

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions