chore: 并入 iotlcm-upstream-proxy 历史到 upstream-proxy/(原提交 44209ec)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
ARG BASE_REGISTRY=docker.io/library
|
||||
FROM ${BASE_REGISTRY}/golang:1.25-alpine AS builder
|
||||
LABEL stage=gobuilder
|
||||
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
# RUN apk update --no-cache && apk add --no-cache tzdata
|
||||
# 安装GCC和相关依赖
|
||||
# RUN apk add --no-cache gcc g++ make autoconf automake binutils-dev gmp-dev isl-dev patchelf
|
||||
# RUN apk update --no-cache && apk add --no-cache tzdata git expect
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG BuildVersion
|
||||
ARG BuildTime
|
||||
ARG CommitID
|
||||
|
||||
RUN go build -o iotlcmupstreamproxy_svc -ldflags "-w -s -X main.BuildVersion=${BuildVersion} -X main.CommitID=${CommitID} -X main.BuildTime=${BuildTime}"
|
||||
|
||||
FROM ${BASE_REGISTRY}/alpine:3.23 AS alpine
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
# RUN apk update --no-cache && apk add --no-cache ca-certificates
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
EXPOSE 11140
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /build/iotlcmupstreamproxy_svc /app/iotlcmupstreamproxy_svc
|
||||
COPY --from=builder /build/build/config.example.yaml /app/config/config.yaml
|
||||
|
||||
CMD ["./iotlcmupstreamproxy_svc"]
|
||||
Reference in New Issue
Block a user