I’m trying to start my project in docker, it was working great, but now something happened and it can’t start. It crashes with
AttributeError: /usr/lib/libgdal.so.20: undefined symbol: OSRSetAxisMappingStrategy
I searched a lot but have no idea how to make it work. I’ve tried updating all the libs I have, but no effect whatsoever.
Here’s what I use:
- Django
- Postgis
- Docker-compose
- Docker
My docker configuration:
FROM python:3.11-buster
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update
&& apt-get install -y
binutils
libproj-dev
gdal-bin
libgdal-dev
postgresql-client
&& rm -rf /var/lib/apt/lists/*
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
# Install Poetry
COPY pyproject.toml poetry.lock* ./
RUN pip install poetry &&
poetry config virtualenvs.create false &&
poetry install --no-dev
# Copy the application code
COPY . .
# Expose ports
EXPOSE 8000
EXPOSE 8001
# Run the application
ENTRYPOINT ["sh", "-c", "poetry run gunicorn app.wsgi:application --bind 0.0.0.0:8000"]