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

Persistent Storage doesn't work on Docker since move to volumes #5199

Open
hardillb opened this issue Feb 26, 2025 · 1 comment · May be fixed by FlowFuse/driver-docker#123
Open

Persistent Storage doesn't work on Docker since move to volumes #5199

hardillb opened this issue Feb 26, 2025 · 1 comment · May be fixed by FlowFuse/driver-docker#123
Assignees
Labels
bug Something isn't working size:M - 3 Sizing estimation point
Milestone

Comments

@hardillb
Copy link
Contributor

hardillb commented Feb 26, 2025

Current Behavior

The docker driver expects persistent storage to be a volume on the host machine so it can be mounted to the instance container.

The changes to docker-compose to use named volumes broke this.

Docker does now appear to support mounting sub-directories from named volumes, so this could be made to work.

See this SO answer for pointers to docker volume subpath work.

https://stackoverflow.com/a/38167198/504554

Will need to mandate current docker version.

Expected Behavior

Persistent storage to work with docker compose.

Steps To Reproduce

Install docker compose

Prospects Affected:

Environment

  • FlowFuse version: 2.14.0
  • Node.js version: all
  • npm version: all
  • Platform/OS: docker
  • Browser: all

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

@hardillb hardillb added bug Something isn't working needs-triage Needs looking at to decide what to do labels Feb 26, 2025
@joepavitt joepavitt added this to the 2.15 milestone Feb 26, 2025
@joepavitt joepavitt added size:M - 3 Sizing estimation point and removed needs-triage Needs looking at to decide what to do labels Feb 26, 2025
@joepavitt joepavitt moved this to Todo in 🛠 Development Feb 26, 2025
@ppawlowski ppawlowski self-assigned this Feb 26, 2025
@hardillb
Copy link
Contributor Author

hardillb commented Feb 26, 2025

I think this is going to need some significant changes to the driver-docker project.

It will need to switch mode to using HostConfig.Mounts rather than HostConfig.binds for the persistent volume

(arround line 108 in the docker.js file)

There are some possible hints here: apocas/dockerode#265 (comment)

I think it will need to include a VolumeOptions object

HostConfig: {
    Mounts: [
      {
        Type: 'volume',
        Source: 'persistent-storeage',
        Target: '/data/storage',
         VolumeOptions: {
             Subpath:  `${project.id}`
         }
      },
    ],

This is just speculation, none of it has been tested.

@ppawlowski ppawlowski moved this from Todo to In Progress in 🛠 Development Mar 2, 2025
@ppawlowski ppawlowski moved this from In Progress to Review in 🛠 Development Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:M - 3 Sizing estimation point
Projects
Status: Review
Development

Successfully merging a pull request may close this issue.

3 participants