Refactor Dockerfile to remove unnecessary user creation and streamline image build process by directly installing dependencies.

This commit is contained in:
Luke Hagar
2025-09-11 17:14:19 +00:00
parent 746af385c4
commit 72f740471d

View File

@@ -7,12 +7,10 @@ COPY . .
RUN CGO_ENABLED=0 go build -o /usr/local/bin/slinky ./
FROM alpine:3.20
RUN adduser -D -u 10001 appuser \
&& apk add --no-cache curl jq ca-certificates
RUN apk add --no-cache curl jq ca-certificates
COPY --from=build /usr/local/bin/slinky /usr/local/bin/slinky
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
USER appuser
ENTRYPOINT ["/entrypoint.sh"]