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

Fly: --swap without --root lead to permission problems with fly volumes #35

Open
skydan opened this issue Apr 22, 2023 · 1 comment
Open

Comments

@skydan
Copy link

skydan commented Apr 22, 2023

I followed Sqlite3 on fly volumes tutorial and proactively enabled swap for demo rails app.

It turned out that, since the container is launched as root user when swap is on, fly mounts volumes for root too:
Mounting /dev/vdb at /mnt/volume w/ uid: 0, gid: 0 and chmod 0755

then entry-point script substitutes user for rails server command with rails user:

https://github.com/rubys/dockerfile-rails/blob/69f7631407735aa558bf99be46e0c0c988435479/lib/generators/templates/docker-entrypoint.erb#L18

rendering mounted volumes un-accessible for rails user.

@rubys
Copy link
Collaborator

rubys commented Apr 24, 2023

This will require dockerfile-rails to check for and parse the fly.toml file, which will be fly.io specific; that being said, I see no reason why this couldn't be done.

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

No branches or pull requests

2 participants