enterprise/Dockerfile

24 lines
620 B
Docker

FROM registry.cn-shanghai.aliyuncs.com/devcon/godev:v1.0.19
#ADD . /app/src
#WORKDIR /app/src
WORKDIR .
RUN mkdir -p /app/bin /app/log
RUN export GOROOT=/usr/local/go1.23.1 && \
export GOPROXY=https://goproxy.cn && \
export GOPRIVATE=gitlab.batiao8.com && \
export PATH=$PATH:$GOROOT/bin && \
go mod tidy && \
go build cmd/worker/enterprise-worker.go && \
go build cmd/server/enterprise-api.go && \
mv enterprise-api /app/bin && \
mv enterprise-worker /app/bin && \
cp -r conf /app && \
cp start.sh /app && \
chmod +x /app/start.sh
WORKDIR /app
EXPOSE 9283
CMD ["/app/start.sh"]