enterprise/Dockerfile

24 lines
609 B
Docker
Raw Normal View History

2024-08-09 15:24:17 +08:00
FROM registry.cn-shanghai.aliyuncs.com/devcon/godev:v1.0.18
2023-08-04 11:13:41 +08:00
ADD . /app/src
WORKDIR /app/src
RUN mkdir -p /app/bin /app/log
2024-08-09 15:24:17 +08:00
RUN export GOROOT=/usr/local/go1.21.4 && \
2023-08-04 11:13:41 +08:00
export GOPROXY=https://goproxy.cn && \
export GOPRIVATE=gitlab.batiao8.com && \
export PATH=$PATH:$GOROOT/bin && \
2023-08-04 11:13:41 +08:00
go mod tidy && \
2025-03-09 00:06:17 +08:00
go build cmd/worker/enterprise-worker.go && \
go build cmd/server/enterprise-api.go && \
2025-03-08 23:55:53 +08:00
mv enterprise-api /app/bin && \
mv enterprise-worker /app/bin && \
2023-08-04 11:13:41 +08:00
cp -r conf /app && \
cp start.sh /app && \
chmod +x /app/start.sh
WORKDIR /app
2023-08-04 11:30:40 +08:00
EXPOSE 9283
2023-08-04 11:13:41 +08:00
CMD ["/app/start.sh"]