Docker Community Forums

Share and learn in the Docker community.

Command option not run as root

Hi guys,

I have this command defition on my docker-compose.yml:

command: >
      bash -c " /home/app/wait-for-it.sh db:3306
      && python manage.py collectstatic --noinput
      && python manage.py migrate
      && python manage.py runserver 0.0.0.0:8000"

My problem:

My command not executed as root user, the command executed with my current session user, throwing this error:

api_1 | bash: /home/app/wait-for-it.sh: Permission denied

When a make a echo $USER i seeing my own username not a docker root user.

Any help?