iloom/washing-service/Dockerfile

16 lines
525 B
Docker
Raw Normal View History

ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library
FROM ${BASE_REGISTRY}/golang:1.24-alpine AS builder
ENV GOPROXY=https://goproxy.cn,direct
WORKDIR /app
COPY shared/ ./shared/
COPY washing-service/ ./washing-service/
WORKDIR /app/washing-service
RUN go build -o /washing-service ./cmd/
FROM ${BASE_REGISTRY}/alpine:3.20
RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories
RUN apk add --no-cache wget
COPY --from=builder /washing-service /washing-service
EXPOSE 8084
CMD ["/washing-service"]