Django and QGIS Dockerimage

75 views
Skip to first unread message

lone...@gmail.com

unread,
Nov 20, 2023, 12:48:18 PM11/20/23
to Django users
Hello all,

  I am playing around with Docker for the first time and would like to go over what I have done so far.  For one docker image, I want to add Django and QGIS in one image.  I think I have done that with the Dockerfile containing:

"FROM python:3
FROM qgis/qgis
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . /code/"

and the docker-compose.yml file of:
"version: "3.9"

services:
  qgis:
    image: qgis
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
     - .:/code
    ports:
     - "8000:8000"
    depends_on:
      - qgis
"

The requirements.txt file contains:
"Django>=4.0, <5.0
psycopg2-binary>=2.8
"

The docker image that I created that has both Django and QGIS is a little bit bigger than the vanilla qgis docker image, so I think I have them both in an image.  How can I perform a simple test to try and verify?

Thank you.
Reply all
Reply to author
Forward
0 new messages