2024-06-20 14:14:34 +08:00
|
|
|
FROM registry.cn-chengdu.aliyuncs.com/go_ls/go-zero:v1 AS builder
|
2024-06-18 16:34:14 +08:00
|
|
|
|
|
|
|
LABEL stage=gobuilder
|
|
|
|
|
2024-06-20 16:23:39 +08:00
|
|
|
ENV CGO_ENABLED 0
|
2024-06-18 16:34:14 +08:00
|
|
|
ENV GOPROXY https://goproxy.cn,direct
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
COPY ../.. .
|
|
|
|
RUN go mod download
|
|
|
|
RUN go build -ldflags="-s -w" -o /src/cmd/rpc/transfer cmd/rpc/transfer.go
|
|
|
|
RUN go build -ldflags="-s -w" -o /src/cmd/rpc/queue/queue cmd/rpc/queue/queue.go
|
|
|
|
|
2024-06-20 14:14:34 +08:00
|
|
|
FROM registry.cn-chengdu.aliyuncs.com/go_ls/alpha:v1 AS runtime
|
2024-06-18 17:25:48 +08:00
|
|
|
|
2024-06-18 16:34:14 +08:00
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
COPY --from=builder /src /src
|
|
|
|
|
|
|
|
RUN mkdir "/var/log/supervisor"
|
|
|
|
WORKDIR /src
|
|
|
|
ADD ./sh/startup.sh /opt/startup.sh
|
|
|
|
RUN sed -i 's/\r//g' /opt/startup.sh
|
|
|
|
ADD ./sh/supervisord.conf /etc/supervisord.conf
|
|
|
|
|
|
|
|
WORKDIR /src
|
2024-07-09 17:07:22 +08:00
|
|
|
EXPOSE 10002
|
2024-06-20 16:22:10 +08:00
|
|
|
#CMD ["sh","/opt/startup.sh"]
|