Update Dockerfile to streamline the weatherfeeder user creation.
All checks were successful
ci/woodpecker/manual/build-image Pipeline was successful

This commit is contained in:
2026-02-01 18:17:12 -06:00
parent df3f42ef30
commit 33c35b5f4a

View File

@@ -64,18 +64,13 @@ WORKDIR /weatherfeeder
# Create an unprivileged user # Create an unprivileged user
RUN useradd \ RUN useradd \
--system \
--uid 10001 \ --uid 10001 \
--create-home \ --no-create-home \
--home-dir /nonexistent \
--shell /usr/sbin/nologin \ --shell /usr/sbin/nologin \
weatherfeeder weatherfeeder
# Copy the binary # Copy the binary
COPY --from=build /out/weatherfeeder /weatherfeeder/weatherfeeder COPY --chown=weatherfeeder:weatherfeeder --from=build /out/weatherfeeder /weatherfeeder/weatherfeeder
# Make sure the user can read config.yml when its mounted in
RUN chown -R weatherfeeder:weatherfeeder /weatherfeeder
USER weatherfeeder USER weatherfeeder