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

[Bug]: Unable to use NFS share due to chmod in Dockerfile #4426

Closed
1 task done
Dhs92 opened this issue Feb 21, 2025 · 2 comments
Closed
1 task done

[Bug]: Unable to use NFS share due to chmod in Dockerfile #4426

Dhs92 opened this issue Feb 21, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Dhs92
Copy link

Dhs92 commented Feb 21, 2025

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

Creating a docker container using the NFS driver results in the following error: Failed to deploy a stack: compose up operation failed: Error response from daemon: failed to chmod on /var/lib/docker/volumes/finance/_data: chmod /var/lib/docker/volumes/finance/_data: operation not permitted

docker-compose.yml

services:
  actual:
    image: actualbudget/actual-server:latest
    container_name: actual
    labels:
      - traefik.enable=true
      - traefik.http.routers.actual.rule=Host(`[[REDACTED]]`)
      - traefik.http.routers.actual.tls.certresolver=letsencrypt
      - traefik.http.routers.actual.entrypoints=websecure
      - traefik.http.services.actual.loadbalancer.server.port=5006
      - traefik.docker.network=traefik_proxy
    volumes:
      - finance:/data
    networks:
      - default
      - traefik_proxy
    environment:
      - ACTUAL_TRUSTED_PROXIES=172.21.0.0/16
    healthcheck:
      # Enable health check for the instance
      test: ['CMD-SHELL', 'node src/scripts/health-check.js']
      interval: 60s
      timeout: 10s
      retries: 3
      start_period: 20s
    restart: unless-stopped

networks:
  default:
  traefik_proxy:
    name: traefik_proxy
    external: true

volumes:
  finance:
    external: true

Even when creating a user on the host with the UID 1001 I get the same error.

Looks like it's possibly due to this inside of sync-server.Dockerfile:

RUN mkdir /data && chown -R ${USERNAME}:${USERNAME} /data

How can we reproduce the issue?

Create a docker container using a volume that uses the NFS driver

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Other

Operating System

Linux

@Dhs92 Dhs92 added the bug Something isn't working label Feb 21, 2025
@youngcw
Copy link
Member

youngcw commented Feb 27, 2025

NFS and sqlite don't play well so you should try to use a different file share than NFS. It would be better to use some sort of synced folder vs a shared folder.

@Dhs92
Copy link
Author

Dhs92 commented Feb 27, 2025

Ah yeah, that's fair. I'll just add a bind mount to the jail I'm running docker in the, thanks!

@youngcw youngcw closed this as completed Feb 27, 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
Projects
None yet
Development

No branches or pull requests

2 participants