2026-06-17 10:17:36 +08:00
|
|
|
ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library
|
|
|
|
|
FROM ${BASE_REGISTRY}/golang:1.24-alpine AS builder
|
|
|
|
|
ENV GOPROXY=https://goproxy.cn,direct
|
2026-06-14 11:33:31 +08:00
|
|
|
WORKDIR /app
|
|
|
|
|
COPY shared/ ./shared/
|
|
|
|
|
COPY textile-service/ ./textile-service/
|
|
|
|
|
WORKDIR /app/textile-service
|
|
|
|
|
RUN go build -o /textile-service ./cmd/
|
|
|
|
|
|
2026-06-17 10:17:36 +08:00
|
|
|
FROM ${BASE_REGISTRY}/alpine:3.20
|
2026-06-17 10:24:59 +08:00
|
|
|
RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories
|
2026-06-14 11:33:31 +08:00
|
|
|
RUN apk add --no-cache wget
|
|
|
|
|
COPY --from=builder /textile-service /textile-service
|
|
|
|
|
EXPOSE 8083
|
|
|
|
|
CMD ["/textile-service"]
|