Skip to content

Commit

Permalink
Bump parent image to debian:bullseye-slim
Browse files Browse the repository at this point in the history
Upgrade to debian:bullseye-slim (Debian 11) as parent Docker image
with Python 3.9.2 and some packages from bullseye-backports.

Refresh Python libraries from Debian packages:

 - python3-cffi: 1.14.3 → 1.14.5
 - python3-chardet: 3.0.4 → 4.0.0
 - python3-elasticsearch: 7.16.1 → 7.17.5
 - python3-gdal: 3.1.3 → 3.2.2
 - python3-numpy: 1.19.2 → 1.19.5
 - python3-pandas 1.0.5 → 1.1.5
 - python3-psycopg2: 2.8.5 → 2.9.3 (from PGDG)
 - python3-pytz: 2020.1 → 2021.1
 - python3-requests: 2.23.0 → 2.25.1
 - python3-six: 1.15.0 → 1.16.0
 - python3-sqlalchemy: 1.3.19 → 1.3.22

Update README.md and docker-publish.yml accordingly.

Fixes #3
  • Loading branch information
anthonyfok committed Sep 22, 2022
1 parent 43a8c4c commit 13a1569
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
#schedule:
# - cron: '34 11 * * *'
branches:
- master # Currently tracking debian-sid-20201012
- master # Currently debian-bullseye
- debian-sid-20201012 # Python 3.8.6 (Debian during bullseye development cycle)
- debian-bullseye # Python 3.9.2 (Debian 11)
- debian-bookworm # Python 3.10.6 (Debian 12 in development)
Expand Down
57 changes: 27 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# =================================================================
#
# Author: Joost van Ulden <[email protected]>
# Authors: Joost van Ulden <[email protected]>
# Anthony Fok <[email protected]>
#
# Copyright (c) 2020-2022 Government of Canada
#
Expand All @@ -27,39 +28,51 @@
#
# =================================================================

FROM debian:sid-20201012-slim
FROM debian:bullseye-slim

LABEL org.opencontainers.image.authors="Joost van Ulden <[email protected]>, Anthony Fok <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/opendrr/python-env"
LABEL org.opencontainers.image.version="1.2.4"
LABEL org.opencontainers.image.version="1.3.0"
LABEL org.opencontainers.image.vendor="Government of Canada"
LABEL org.opencontainers.image.licenses="MIT"

# To use Debian Snapshot, prepend the following commands:
# echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/docker-snapshot.conf
# sed -i '/snapshot.debian.org/s/^# //; /deb.debian.org/s/^/# /' /etc/apt/sources.list

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/docker-snapshot.conf \
&& sed -i '/snapshot.debian.org/s/^# //; /deb.debian.org/s/^/# /' /etc/apt/sources.list \
&& echo 'deb http://deb.debian.org/debian bullseye main' >> /etc/apt/sources.list \
&& echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list \
&& printf 'Package: *\n\
Pin: release n=bullseye\n\
Pin-Priority: 50' > /etc/apt/preferences.d/git-in-bullseye \
&& cat /etc/apt/preferences.d/git-in-bullseye \
RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
eatmydata \
&& eatmydata apt-get install -y --no-install-recommends \
ca-certificates \
curl \
eatmydata \
gpg \
&& curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor \
| tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null \
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main 14' \
> /etc/apt/sources.list.d/pgdg.list \
&& curl -fsSL --create-dirs --output /usr/share/keyrings/githubcli-archive-keyring.gpg \
https://cli.github.com/packages/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list \
&& eatmydata apt-get update \
&& eatmydata apt-get install -t bullseye-backports -y --no-install-recommends \
7zip \
dos2unix \
gdal-bin \
gpg \
git \
git-lfs \
gh \
jq \
moreutils \
nano \
neovim \
postgresql-client \
procps \
pv \
pypy3 \
python3-elasticsearch \
python3-numpy \
python3-pandas \
python3-psycopg2 \
Expand All @@ -69,22 +82,6 @@ Pin-Priority: 50' > /etc/apt/preferences.d/git-in-bullseye \
python3-pip \
time \
xz-utils \
&& eatmydata apt-get install -y --no-install-recommends -t bullseye-backports \
7zip \
git \
git-lfs \
&& curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor \
| tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null \
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main 14' \
> /etc/apt/sources.list.d/pgdg.list \
&& curl -fsSL --create-dirs --output /usr/share/keyrings/githubcli-archive-keyring.gpg \
https://cli.github.com/packages/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list \
&& eatmydata apt-get update \
&& eatmydata apt-get install -y --no-install-recommends \
gh \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt /tmp
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ tailored for the OpenDRR/opendrr-api stack build process.

Existing versions/branches:

* v1.0: Python 3.8.5, based on debian:sid-20200720-slim (between Debian 10 and Debian 11, `opendrr/python-env:1.0`)
* v1.0.3: Python 3.8.5, based on debian:sid-20200720-slim (between Debian 10 and Debian 11, `ghcr.io/opendrr/python-env:1.0.3`)
* v1.1.0: Python 3.8.6, based on debian:sid-20201012-slim (between Debian 10 and Debian 11)
* v1.2.x, `latest` (stable): Python 3.8.6, Elasticsearch 7.16, based on debian:sid-20201012-slim, with the use of requirements.txt restored
* `debian-sid-20201012` branch, also the `master` branch currently
* `debian-sid-20201012` branch
* Image: `ghcr.io/opendrr/python-env:1.2.4`

* v1.3.x (dev): Python 3.9.2, Elasticsearch 7.17, based on debian:bullseye-slim (Debian 11, released August 2022)
* `debian-bullseye` branch
* `debian-bullseye` branch, also the current `master` branch
* Image: `ghcr.io/opendrr/python-env:1.3.0`, `ghcr.io/opendrr/python-env:debian-bullseye`, `ghcr.io/opendrr/python-env:edge`

Planned branches/versions:
Planned future branch/versions:

* v1.4.x (dev): Python 3.10.x, Elasticsearch 8.x, based on debian:bookworm-slim (Debian 12, expected to be released in mid-2023)
* `debian-bookworm` branch

Previous versions:

* v1.1.0: Python 3.8.6, based on debian:sid-20201012-slim (between Debian 10 and Debian 11)
* v1.0.3: Python 3.8.5, based on debian:sid-20200720-slim (between Debian 10 and Debian 11, `ghcr.io/opendrr/python-env:1.0.3`)
* v1.0: Python 3.8.5, based on debian:sid-20200720-slim (between Debian 10 and Debian 11, `opendrr/python-env:1.0`)

## Updating ghcr.io/opendrr/python-env:edge (for testing)

1. Push your latest commits to the `master` branch.
Expand Down
22 changes: 11 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
elasticsearch==7.16.1
GDAL==3.1.3
cffi==1.14.5
chardet==4.0.0
elasticsearch==7.17.5
GDAL==3.2.2
idna==2.10
numpy==1.19.2
pandas==1.0.5
numpy==1.19.5
pandas==1.1.5
ply==3.11
psycopg2==2.8.5
psycopg2==2.9.3
psycopg2cffi==2.8.1
pycparser==2.20
python-dateutil==2.8.1
pytz==2020.1
requests==2.23.0
six==1.15.0
SQLAlchemy==1.3.19
pytz==2021.1
requests==2.25.1
six==1.16.0
SQLAlchemy==1.3.22
urllib3==1.26.12

0 comments on commit 13a1569

Please sign in to comment.