hadolint 2.15.x - pulled in by hadolint-action v3.5.0 - adds DL3066
("Non-numeric user-id may not be resolvable by host system"). The
Dockerfile's `USER muser` trips it and the hadolint job exits 1 (hadolint
fails on info-level findings by default), turning the PR Checks pipeline
red on the Renovate bump PR.
muser was created without an explicit uid/gid, so its numeric identity
depended on busybox's auto-assignment. Both ids are now pinned at
1000:1000 - the values Alpine was already assigning - and USER uses the
numeric form, which is always resolvable by the host.
Verified with the upstream hadolint v2.15.1 binary: the previous
Dockerfile reports "Dockerfile:9 DL3066 info" and exits 1, the fixed one
lints clean and exits 0.
The hadolint-action v3.3.0 -> v3.5.0 bump is included here (all four
workflows, SHA 06be81ba) so that master ends up on v3.5.0 with a clean
lint - superseding Renovate PR #23.
13 lines
366 B
Docker
13 lines
366 B
Docker
FROM alpine:3.24
|
|
LABEL maintainer="Cabillot Julien <dockerimages@cabillot.eu>"
|
|
|
|
# hadolint ignore=DL3018
|
|
RUN apk add --no-cache mysql-client && \
|
|
rm -rf /usr/share/apk/keys && \
|
|
addgroup -g 1000 muser && \
|
|
adduser -D -u 1000 -G muser muser
|
|
|
|
# Numeric uid/gid (DL3066): identity stays resolvable by the host
|
|
USER 1000:1000
|
|
|
|
ENTRYPOINT [ "/usr/bin/mysql" ] |