Docker Community Forums

Share and learn in the Docker community.

PermissionError: [Errno 13] Permission denied: '/home/fred/docker/tmp/db'

I have just installed Docker and I am trying to setup an application server based on Ruby on Rails. These are my first steps with Docker!

Following Compose’s tutorial for Rails, I configured and run containers creation:

docker-compose run web rails new . --force --no-deps --database=postgresql

It runs, fails and then returns:

PermissionError: [Errno 13] Permission denied: ‘/home/fred/docker/tmp/db’

Apparently, the run tries to perform an action on the docker/tmp/db folder, which is owned by systemd-coredump:root while tmp is owned by root:root

Did I make something wrong when installing with sudo ?
How can I solve this?
Thanks!

The first step would be sharing the complete docker-compose.yml - please only redact url, tokens or password and keep everything else untouched.