fly-apps / fly-apps/dockerfile-rails
Fly: `--swap` without `--root` lead to permission problems with fly volumes
- Dominant language
- Dockerfile
- Stars
- 559
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
I followed [Sqlite3 on fly volumes](https://fly.io/docs/rails/advanced-guides/sqlite3) tutorial and proactively enabled [swap](https://fly.io/docs/rails/getting-started/dockerfiles/#out-of-memory) 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.