Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
eyvorchuk committed May 24, 2024
1 parent 75c5b4e commit 299e1c2
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
FROM python:3.8-slim
FROM python:3.11-slim

LABEL Maintainer=https://github.com/pacificclimate/thunderbird Description="thunderbird WPS" Vendor="pcic" Version="1.2.3"
ENV DEBIAN_FRONTEND=noninteractive
ENV PIP_INDEX_URL="https://pypi.pacificclimate.org/simple/"

COPY . /tmp
ADD poetry.lock /tmp
ADD pyproject.toml /tmp
WORKDIR /tmp

RUN apt-get update && \
apt-get install -y build-essential cdo libhdf5-serial-dev netcdf-bin libnetcdf-dev && \
apt-get install -y build-essential cdo curl libhdf5-serial-dev netcdf-bin libnetcdf-dev && \
rm -rf /var/lib/apt/lists/* && \
# this line combats the issue found here:
# https://superuser.com/questions/1347723/arch-on-wsl-libqt5core-so-5-not-found-despite-being-installed
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 && \
# Removing this package prevents a scan failure. It will be reintroduced
# once 1.24.2 becomes available through the base image.
# Issue link: https://github.com/advisories/GHSA-mh33-7rrq-662w
apt-get remove -y python3-urllib3 && \
pip install -U pip && \
pip install . && \
pip install gunicorn
apt-get remove -y python3-urllib3

RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH=/root/.local/bin:$PATH
RUN poetry install && \
poetry add gunicorn

EXPOSE 5000
CMD ["gunicorn", "--bind=0.0.0.0:5000", "thunderbird.wsgi:application"]
CMD ["poetry", "run", "gunicorn", "--bind=0.0.0.0:5000", "thunderbird.wsgi:application"]

0 comments on commit 299e1c2

Please sign in to comment.