18 lines
608 B
Docker
Raw Permalink Normal View History

2026-07-22 12:35:21 +09:00
ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library/
FROM ${BASE_REGISTRY}golang:1.24-alpine AS builder
ARG GOPROXY=https://goproxy.cn,direct
ENV GOPROXY=${GOPROXY}
WORKDIR /app
COPY shared/ ./shared/
COPY textile-service/ ./textile-service/
WORKDIR /app/textile-service
RUN go build -o /textile-service ./cmd/
2026-07-22 12:35:21 +09:00
FROM ${BASE_REGISTRY}alpine:3.20
ARG APK_MIRROR=mirrors.aliyun.com
RUN if [ -n "$APK_MIRROR" ]; then sed -i "s|dl-cdn.alpinelinux.org|$APK_MIRROR|g" /etc/apk/repositories; fi
RUN apk add --no-cache wget
COPY --from=builder /textile-service /textile-service
EXPOSE 8083
CMD ["/textile-service"]