Skip to content

Commit

Permalink
build(docker): pin pip requirements in requirements.txt for dockerfil…
Browse files Browse the repository at this point in the history
…es (#3023)
  • Loading branch information
hairyhum authored Aug 9, 2024
1 parent adbb3a6 commit b0e1b5d
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 7 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ updates:
interval: weekly
commit-message:
prefix: "deps(docker):"
# Update pinned pip packages via requiements.txt
- package-ecosystem: "pip"
directory: "/docker/build"
schedule:
interval: weekly
commit-message:
prefix: "deps(docker,pip):"
- package-ecosystem: "docker"
directory: "/docker/build"
schedule:
Expand Down Expand Up @@ -148,12 +155,26 @@ updates:
interval: weekly
commit-message:
prefix: "deps(docker):"
# Update pinned pip packages via requiements.txt
- package-ecosystem: "pip"
directory: "/docker/postgres-kanister-tools"
schedule:
interval: weekly
commit-message:
prefix: "deps(docker,pip):"
- package-ecosystem: "docker"
directory: "/docker/postgres-kanister-tools"
schedule:
interval: weekly
commit-message:
prefix: "deps(docker):"
# Update pinned pip packages via requiements.txt
- package-ecosystem: "pip"
directory: "/docker/postgresql"
schedule:
interval: weekly
commit-message:
prefix: "deps(docker,pip):"
- package-ecosystem: "docker"
directory: "/docker/postgresql"
schedule:
Expand Down
3 changes: 2 additions & 1 deletion docker/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ RUN GOBIN=/usr/local/bin go install github.com/ahmetb/gen-crd-api-reference-docs

RUN apt-get update && apt-get install -y pip

RUN pip install reno nb2plots
COPY docker/build/requirements.txt requirements.txt
RUN pip install -r requirements.txt

RUN apt-get install -y vim

Expand Down
2 changes: 2 additions & 0 deletions docker/build/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reno==4.1.0
nb2plots==0.7.2
5 changes: 3 additions & 2 deletions docker/postgres-kanister-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ ENV DEBIAN_FRONTEND noninteractive

USER root

COPY docker/postgres-kanister-tools/requirements.txt requirements.txt

RUN apt-get update && apt-get -y install curl python3 groff less jq python3-pip && \
pip3 install --upgrade pip setuptools wheel && \
pip3 install --upgrade awscli && \
pip3 install -r requirements.txt && \
apt-get remove -y python3-setuptools python3-wheel && \
apt-get clean

Expand Down
4 changes: 4 additions & 0 deletions docker/postgres-kanister-tools/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
awscli==1.33.38
pip==24.2
setuptools==72.1.0
wheel==0.44.0
7 changes: 3 additions & 4 deletions docker/postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ USER root
RUN useradd -r --gid=0 --uid=1001 postgres

# Install required components for backup
COPY docker/postgresql/requirements.txt requirements.txt

RUN set -x \
&& apt-get update \
&& apt-get install -y curl groff lzop pv postgresql-client python3-pip daemontools \
&& pip3 install --break-system-packages --upgrade pip \
&& hash -r pip3 \
&& pip3 install --break-system-packages wal-e[aws] \
&& pip3 install --break-system-packages awscli
&& pip3 install --break-system-packages -r requirements.txt

USER postgres
5 changes: 5 additions & 0 deletions docker/postgresql/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
awscli==1.33.38
wal-e==1.1.1
pip==24.2
setuptools==72.1.0
wheel==0.44.0

0 comments on commit b0e1b5d

Please sign in to comment.