title: Failed to build a docker container with pyproj
body: <p>I'm trying to build a docker container that should contain pyproj package. I prefer to stay with <code>python:3-alpine</code> since it is so far the only way I have managed to install a python mariaDB client (hence the other docker commands).</p>
  <p>My <strong>Dockerfile</strong></p>
  <pre><code>FROM python:3-alpine
  
  RUN mkdir –m777 /usr/bin/proj
  ENV PROJ_DIR=/usr
  
  RUN apk add --no-cache build-base proj proj-dev
  RUN pip install --upgrade pip &amp;&amp; \
      pip install pyproj==2.4.0
  
  RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main openssl \
      build-base cmake musl-dev linux-headers
  RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing gdal-dev
  
  RUN apk add --no-cache mariadb-dev build-base
  </code></pre>
  <p>Console output</p>
  <pre><code>docker build . -t dockerpython
  Sending build context to Docker daemon  557.1kB
  Sending build context to Docker daemon  137.5MB
  Step 1/13 : FROM python:3-alpine
   ---&gt; dc68588b1801
  Step 2/13 : RUN mkdir –m777 /usr/bin/proj
   ---&gt; Using cache
   ---&gt; 499167715cfb
  Step 3/13 : ENV PROJ_DIR=/usr
   ---&gt; Using cache
   ---&gt; a96f037cf53f
  Step 4/13 : RUN apk add --no-cache build-base proj proj-dev
   ---&gt; Using cache
   ---&gt; 40e3099b6546
  Step 5/13 : RUN pip install --upgrade pip &amp;&amp;     pip install pyproj==2.4.0
   ---&gt; Running in e06e02c59a6c
  Requirement already up-to-date: pip in /usr/local/lib/python3.9/site-packages (20.2.4)
  Collecting pyproj==2.4.0
    Downloading pyproj-2.4.0.tar.gz (460 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp1pjmenku
         cwd: /tmp/pip-install-04c55e8d/pyproj
    Complete output (34 lines):
    PROJ_DIR is set, using existing proj4 installation..
    
    Traceback (most recent call last):
      File &quot;/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 280, in &lt;module&gt;
        main()
      File &quot;/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File &quot;/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 114, in get_requires_for_build_wheel
        return hook(config_settings)
      File &quot;/tmp/pip-build-env-jasrw0jd/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 149, in get_requires_for_build_wheel
        return self._get_build_requires(
      File &quot;/tmp/pip-build-env-jasrw0jd/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 130, in _get_build_requires
        self.run_setup()
      File &quot;/tmp/pip-build-env-jasrw0jd/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 253, in run_setup
        super(_BuildMetaLegacyBackend,
      File &quot;/tmp/pip-build-env-jasrw0jd/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 145, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File &quot;setup.py&quot;, line 236, in &lt;module&gt;
        ext_modules=get_extension_modules(),
      File &quot;setup.py&quot;, line 140, in get_extension_modules
        proj_dir = get_proj_dir()
      File &quot;setup.py&quot;, line 53, in get_proj_dir
        check_proj_version(proj_dir)
      File &quot;setup.py&quot;, line 20, in check_proj_version
        proj_ver_bytes = subprocess.check_output(proj, stderr=subprocess.STDOUT)
      File &quot;/usr/local/lib/python3.9/subprocess.py&quot;, line 420, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File &quot;/usr/local/lib/python3.9/subprocess.py&quot;, line 501, in run
        with Popen(*popenargs, **kwargs) as process:
      File &quot;/usr/local/lib/python3.9/subprocess.py&quot;, line 947, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File &quot;/usr/local/lib/python3.9/subprocess.py&quot;, line 1819, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    PermissionError: [Errno 13] Permission denied: '/usr/bin/proj'
    ----------------------------------------
  ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp1pjmenku Check the logs for full command output.
  The command '/bin/sh -c pip install --upgrade pip &amp;&amp;     pip install pyproj==2.4.0' returned a non-zero code: 1
  </code></pre>