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
RUN useradd \
--system \
--uid 10001 \
--create-home \
--home-dir /nonexistent \
--no-create-home \
--shell /usr/sbin/nologin \
weatherfeeder
# Copy the binary
COPY --from=build /out/weatherfeeder /weatherfeeder/weatherfeeder
# Make sure the user can read config.yml when its mounted in
RUN chown -R weatherfeeder:weatherfeeder /weatherfeeder
COPY --chown=weatherfeeder:weatherfeeder --from=build /out/weatherfeeder /weatherfeeder/weatherfeeder
USER weatherfeeder