Skip to content

Commit

Permalink
Merge pull request #68 from OpenDRR/postgresql-14-pgdg
Browse files Browse the repository at this point in the history
Install postgresql-client 14 from PGDG APT repo
  • Loading branch information
drotheram authored Sep 14, 2022
2 parents adb904a + a838d45 commit 43a8c4c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ FROM debian:sid-20201012-slim

LABEL org.opencontainers.image.authors="Joost van Ulden <joost.vanulden@canada.ca>, Anthony Fok <anthony.fok@canada.ca>"
LABEL org.opencontainers.image.source="https://github.com/opendrr/python-env"
LABEL org.opencontainers.image.version="1.2.3"
LABEL org.opencontainers.image.version="1.2.4"
LABEL org.opencontainers.image.vendor="Government of Canada"
LABEL org.opencontainers.image.licenses="MIT"

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 \
Expand All @@ -51,11 +52,11 @@ Pin-Priority: 50' > /etc/apt/preferences.d/git-in-bullseye \
curl \
dos2unix \
gdal-bin \
gpg \
jq \
moreutils \
nano \
neovim \
postgresql-client \
procps \
pv \
pypy3 \
Expand All @@ -72,12 +73,18 @@ Pin-Priority: 50' > /etc/apt/preferences.d/git-in-bullseye \
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 \
&& eatmydata apt-get install -y --no-install-recommends \
gh \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt /tmp
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ Not recommend to use the `edge` version in python/Dockerfile of OpenDRR/opendrr-
## Creating ghcr.io/opendrr/python-env:latest production releases

1. Create a new release tag,
e.g. a signed tag from the command-line by using `git tag -s v1.2.3`,
typing up a brief release notes, and `git push origin v1.2.3`. (optional)
e.g. a signed tag from the command-line by using `git tag -s v1.2.4`,
typing up a brief release notes, and `git push origin v1.2.4`. (optional)
2. Alternatively or additionally, [draft a new release](https://github.com/OpenDRR/python-env/releases/new)
through the GitHub web interface so the new release and release notes are immediately visible.
3. Visit <https://github.com/OpenDRR/python-env/pkgs/container/python-env>
and check under "Recent tagged image versions" that the a new image versioned `latest` `1.2.3` is published.
and check under "Recent tagged image versions" that the a new image versioned `latest` `1.2.4` is published.

To test locally:

```console
docker run -it --rm ghcr.io/opendrr/python-env:1.2.3
docker run -it --rm ghcr.io/opendrr/python-env:1.2.4
```

To test with OpenDRR/opendrr-api, edit the `FROM` line in python/Dockerfile accordingly, e.g. `FROM ghcr.io/opendrr/python-env:1.2.3`.
To test with OpenDRR/opendrr-api, edit the `FROM` line in python/Dockerfile accordingly, e.g. `FROM ghcr.io/opendrr/python-env:1.2.4`.

0 comments on commit 43a8c4c

Please sign in to comment.