Skip to content

Commit b1f7955

Browse files
committed
feat: pin Debian dependencies
This allows to faster update on security updates of git and other packages.
1 parent b0cfdc3 commit b1f7955

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

.github/renovate.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@
137137
"matchStrings": [
138138
"renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+version: (?<currentValue>.*)\\s"
139139
]
140+
},
141+
{
142+
"customType": "regex",
143+
"fileMatch": [
144+
"^Dockerfile$"
145+
],
146+
"matchStrings": [
147+
"#\\s*renovate:\\s*?(release=(?<release>.*?))?\\s*depName=(?<depName>.*?)?\\sENV .*?_VERSION=\"(?<currentValue>.*)\""
148+
],
149+
"registryUrlTemplate": "https://deb.debian.org/debian?{{#if release }}release={{release}}{{else}}suite=stable{{/if}}&components=main,contrib,non-free&binaryArch=amd64",
150+
"datasourceTemplate": "deb"
140151
}
141152
]
142153
}

Dockerfile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ ENV PYTHONUNBUFFERED=1
4646
# Add virtualenv to path
4747
ENV PATH=/app/venv/bin:/opt/tools/bin:/usr/local/bin:/usr/bin:/bin
4848

49+
# Debian packages pins
50+
51+
# renovate: release=bookworm depName=git
52+
ENV GIT_VERSION=1:2.39.5-0+deb12u2
53+
# renovate: release=bookworm depName=ca-certificates
54+
ENV CA_VERSION=20230311
55+
# renovate: release=bookworm depName=curl
56+
ENV CURL_VERSION=7.88.1-10+deb12u8
57+
# renovate: release=bookworm depName=openssh-client
58+
ENV OPENSSH_VERSION=1:9.2p1-2+deb12u4
59+
4960
# Install dependencies
5061
# hadolint ignore=DL3008,DL3013,SC2046,DL3003
5162
RUN \
@@ -55,16 +66,16 @@ RUN \
5566
&& apt-get install --no-install-recommends -y \
5667
nginx-light \
5768
ruby-licensee \
58-
openssh-client \
59-
ca-certificates \
60-
curl \
69+
openssh-client="${OPENSSH_VERSION}" \
70+
ca-certificates="${CA_VERSION}" \
71+
curl="${CURL_VERSION}" \
6172
gir1.2-pango-1.0 \
6273
gir1.2-rsvg-2.0 \
6374
libxmlsec1-openssl \
6475
libjpeg62-turbo \
6576
libmariadb3 \
6677
gettext \
67-
git \
78+
git="${GIT_VERSION}" \
6879
git-svn \
6980
gnupg \
7081
subversion \

0 commit comments

Comments
 (0)