iloom/auth-service/Dockerfile

15 lines
423 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 auth-service/ ./auth-service/
WORKDIR /app/auth-service
RUN go build -o /auth-service ./cmd/
FROM ${BASE_REGISTRY}/alpine:3.20
RUN apk add --no-cache wget
COPY --from=builder /auth-service /auth-service
EXPOSE 8081
CMD ["/auth-service"]