Skip to content

Commit e26a252

Browse files
labkey-willmclaude
andcommitted
Unpin apt/apk package versions to fix periodic build failures
Ubuntu/Alpine archives keep only the latest build of each package, so exact pins like curl=8.5.0-2ubuntu10.9 get rotated out on each security update and break the build. The `apt-get upgrade`/`apk upgrade` steps already pull latest-patched versions, so the pins provided no reproducibility or supply-chain benefit (signed repo metadata is the real control) -- they only caused the failures. Removing them also eliminates the misleading buried "Version not found" error. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent 8f2620f commit e26a252

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

Dockerfile

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ COPY entrypoint.sh /entrypoint.sh
113113

114114
WORKDIR "${LABKEY_HOME}"
115115

116+
# OS packages below are intentionally NOT version-pinned. The `apt-get upgrade` / `apk upgrade`
117+
# steps in the RUN pull latest-patched versions anyway, and exact pins get rotated out of the
118+
# distro archive on each security update, breaking builds. Signed repo metadata — not the
119+
# version string — is the supply-chain control. This is why DL3008/DL3018 are ignored below.
116120
# hadolint ignore=DL4006,DL3008,DL3018
117121
RUN [ -n "${DEBUG}" ] && set -x; \
118122
set -eu; \
@@ -123,11 +127,11 @@ RUN [ -n "${DEBUG}" ] && set -x; \
123127
apk update \
124128
&& apk add --no-cache \
125129
openssl \
126-
gettext=0.21.1-r7 \
127-
unzip=6.0-r14 \
128-
curl=8.1.2-r0 \
130+
gettext \
131+
unzip \
132+
curl \
129133
; \
130-
[ -n "${DEBUG}" ] && apk add --no-cache tree=2.1.1-r0; \
134+
[ -n "${DEBUG}" ] && apk add --no-cache tree; \
131135
apk upgrade; \
132136
\
133137
addgroup -S labkey \
@@ -144,22 +148,22 @@ RUN [ -n "${DEBUG}" ] && set -x; \
144148
export DEBIAN_FRONTEND=noninteractive; \
145149
apt-get update; \
146150
apt-get -yq --no-install-recommends install \
147-
curl=8.5.0-2ubuntu10.9 \
151+
curl \
148152
openssl \
149-
gettext-base=0.21-14ubuntu2 \
150-
unzip=6.0-28ubuntu4.1 \
151-
wget=1.21.4-1ubuntu4.1 \
153+
gettext-base \
154+
unzip \
155+
wget \
152156
; \
153157
if [ -n "${DEBUG}" ]; then \
154158
apt-get update; \
155159
apt-get -yq --no-install-recommends install \
156-
iputils-ping=3:20240117-1ubuntu0.1 \
157-
less=590-2ubuntu2.1 \
158-
netcat-traditional=1.10-48 \
159-
postgresql-client-16=16.10-0ubuntu0.24.04.1 \
160-
sudo=1.9.15p5-3ubuntu5.24.04.1 \
161-
tree=2.1.1-2ubuntu3.24.04.2 \
162-
vim=2:9.1.0016-1ubuntu7.9 \
160+
iputils-ping \
161+
less \
162+
netcat-traditional \
163+
postgresql-client-16 \
164+
sudo \
165+
tree \
166+
vim \
163167
; \
164168
fi; \
165169
apt-get -yq upgrade; \

0 commit comments

Comments
 (0)