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:
rendering mounted volumes un-accessible for rails user.
You may need the --root option. Either that or to manually add lines to the docker-entrypoint prior to line you highlighted that changes the ownership some or all of the directories on the volume.
Note: this is true whether or not you have enabled swap. Now I see. Defining swap is only possible as root, and that changes the ownership of the volume. At the moment, dockerfiles-rails is unaware of volume mounts so it can’t correct this. The options listed above are the only options at the moment.