refactor(Dockerfile): simplify development Dockerfile

This commit is contained in:
yusing
2025-09-21 13:00:43 +08:00
parent af8e2d56b2
commit ddd27156fc

View File

@@ -1,23 +1,17 @@
# Stage 1: deps
FROM golang:1.25.0-alpine AS deps
FROM alpine:3.22 AS deps
HEALTHCHECK NONE
# package version does not matter
# trunk-ignore(hadolint/DL3018)
RUN apk add --no-cache tzdata make libcap-setcap
RUN apk add --no-cache tzdata
# Stage 3: Final image
FROM alpine:3.22
# Stage 2: Final image
FROM deps
LABEL maintainer="yusing@6uo.me"
LABEL proxy.exclude=1
# copy timezone data
COPY --from=deps /usr/share/zoneinfo /usr/share/zoneinfo
# copy certs
COPY --from=deps /etc/ssl/certs /etc/ssl/certs
ARG TARGET
ENV TARGET=${TARGET}