title: PermissionError: [Errno 13] Permission denied: '/manage.py'
body: <p>I am trying to run the following command in <code>docker-composer</code>, to start project with <code>django-admin</code>:</p>
  <pre><code>docker-compose run app sh -c &quot;django-admin startproject app .&quot;
  </code></pre>
  <p>This produces the error:</p>
  <pre><code>    Traceback (most recent call last):
    File &quot;/usr/local/bin/django-admin&quot;, line 10, in &lt;module&gt;
      sys.exit(execute_from_command_line())
    File &quot;/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py&quot;, line 381, in execute_from_command_line
      utility.execute()
    File &quot;/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py&quot;, line 375, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/usr/local/lib/python3.7/site-packages/django/core/management/base.py&quot;, line 323, in run_from_argv
      self.execute(*args, **cmd_options)
    File &quot;/usr/local/lib/python3.7/site-packages/django/core/management/base.py&quot;, line 364, in execute
      output = self.handle(*args, **options)
    File &quot;/usr/local/lib/python3.7/site-packages/django/core/management/commands/startproject.py&quot;, line 20, in handle
      super().handle('project', project_name, target, **options)
    File &quot;/usr/local/lib/python3.7/site-packages/django/core/management/templates.py&quot;, line 155, in handle
      with open(new_path, 'w', encoding='utf-8') as new_file:
  PermissionError: [Errno 13] Permission denied: '/manage.py'
  </code></pre>
  <p>The Dockerfile is as follows:</p>
  <pre><code>FROM python:3.7-alpine
  MAINTAINER anubrij chandra
  
  ENV PYTHONUNBUFFERED 1
  
  COPY ./requirements.txt /requirements.txt
  
  RUN pip install -r /requirements.txt
  
  RUN mkdir /app
  COPY ./app /app
  
  
  
  RUN adduser -D dockuser
  USER dockuser
  </code></pre>
  <p>My <code>docker-compose.yml</code>:</p>
  <pre><code>version: &quot;3&quot;
  
  services:
    app:
      build:
        context: .
      ports:
        - &quot;8000:8000&quot;
      volumes:
        - ./app:/app
      command: &gt;
        sh -c &quot;python manage.py runserver 0.0.0.0:8000&quot;
  </code></pre>
  <p>I applied the solution suggested in <a href="https://stackoverflow.com/questions/32606304/permissionerror-errno-13-permission-denied-code-manage-py">this Stack Overflow thread</a>, but it didn't work.</p>
  <p>I'm using Ubuntu 18.04.</p>