-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |