title: AttributeError: /usr/lib/libgdal.so.1: undefined symbol: OGR_F_GetFieldAsInteger64 While installing in Docker
body: <p><strong>Getting error while installing GeoDjango on docker with postgres db.</strong></p>
  
  <p>I'm completely new to docker and i'm setting up my project on docker. I don't know, is this error is regarding django or postgres. </p>
  
  <p>Found this error </p>
  
  <blockquote>
    <p>AttributeError: /usr/lib/libgdal.so.1: undefined symbol:
    OGR_F_GetFieldAsInteger64 While installing in Docker</p>
  </blockquote>
  
  <p><strong>docker-compose.yml</strong></p>
  
  <pre><code>version: '3'
  services:
          postgres:
                  restart: always
                  image: postgres:alpine
                  volumes:
                          - ./postgres_gis/gis_db:/home/dev/gis_db.sql
                  environment:
                          POSTGRES_USER: postgres
                          POSTGRES_PASSWORD: Dev@mishra123
                          POSTGRES_DB: gis_db
                  expose:
                          - "5432"
          web:
                  build: ./HomePage
                  restart: always
                  expose:
                          - "8000"
                  volumes:
                          - ./HomePage:/home/dev/app/HomePage
                  depends_on:
                          - postgres
                  environment:
                          - DEBUG=1
  </code></pre>
  
  <p><strong>web/Dockerfile</strong></p>
  
  <pre><code>from python:3.6.2-slim
  RUN groupadd dev &amp;&amp; useradd -m -g dev -s /bin/bash dev
  RUN echo "dev ALL=(ALL) NOPASSWD:ALL" &gt;&gt; /etc/sudoers
  RUN mkdir -p /home/dev/app/HomePage
  RUN chown -R dev:dev /home/dev/app
  RUN chmod -R +x+r+w /home/dev/app
  WORKDIR /home/dev/app/HomePage
  RUN apt-get update &amp;&amp; apt-get -y upgrade
  COPY requirements.txt /home/dev/app/HomePage
  RUN apt-get install -y python3-dev python3-pip
  RUN apt-get install -y libpq-dev
  RUN apt-get install -y binutils libproj-dev gdal-bin
  RUN pip install --upgrade pip
  RUN pip install -r requirements.txt
  COPY ./docker-entrypoint.sh /
  RUN chmod +x /docker-entrypoint.sh
  USER dev
  ENTRYPOINT ["/docker-entrypoint.sh"]
  CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
  </code></pre>
  
  <p>web/docker-entrypoint.sh</p>
  
  <pre><code>#!/bin/sh
  python manage.py makemigrations
  python manage.py migrate
  python manage.py runserver 0.0.0.0:8000
  </code></pre>
  
  <p><strong>docker-compose ps :</strong></p>
  
  <pre><code>root@BlackCat:/home/dev/Project-EX/django-PR# docker-compose up      
  Starting django-pr_postgres_1 ... done
  Starting django-pr_web_1      ... done
  Attaching to django-pr_postgres_1, django-pr_web_1
  postgres_1  | 2019-12-12 16:34:43.907 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
  postgres_1  | 2019-12-12 16:34:43.908 UTC [1] LOG:  listening on IPv6 address "::", port 5432
  postgres_1  | 2019-12-12 16:34:44.099 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
  postgres_1  | 2019-12-12 16:34:44.672 UTC [18] LOG:  database system was shut down at 2019-12-11 18:45:45 UTC
  postgres_1  | 2019-12-12 16:34:44.912 UTC [1] LOG:  database system is ready to accept connections
  web_1       | Traceback (most recent call last):
  web_1       |   File "manage.py", line 22, in &lt;module&gt;
  web_1       |     execute_from_command_line(sys.argv)
  web_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
  web_1       |     utility.execute()
  web_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 377, in execute
  web_1       |     django.setup()
  web_1       |   File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
  web_1       |     apps.populate(settings.INSTALLED_APPS)
  web_1       |   File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate
  web_1       |     app_config.import_models()
  web_1       |   File "/usr/local/lib/python3.6/site-packages/django/apps/config.py", line 211, in import_models
  web_1       |     self.models_module = import_module(models_module_name)
  web_1       |   File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
  web_1       |     return _bootstrap._gcd_import(name[level:], package, 
  web_1       |     func = self.__getitem__(name)
  web_1       |   File "/usr/local/lib/python3.6/ctypes/__init__.py", line 366, in __getitem__
  web_1       |     func = self._FuncPtr((name_or_ordinal, self))
  web_1       | AttributeError: /usr/lib/libgdal.so.1: undefined symbol: OGR_F_GetFieldAsInteger64
  web_1       | Watching for file changes with StatReloader
  </code></pre>