2023-10-19 11:00:45 +08:00
|
|
|
FROM registry.cn-shanghai.aliyuncs.com/devcon/godev:v1.0.15
|
2023-08-04 11:13:41 +08:00
|
|
|
ADD . /app/src
|
|
|
|
WORKDIR /app/src
|
|
|
|
|
|
|
|
RUN mkdir -p /app/bin /app/log
|
|
|
|
|
|
|
|
RUN export GOROOT=/usr/local/go1.18.2 && \
|
|
|
|
export GOPROXY=https://goproxy.cn && \
|
2024-01-22 22:51:52 +08:00
|
|
|
export GOPRIVATE=gitlab.batiao8.com && \
|
|
|
|
export PATH=$PATH:$GOROOT/bin && \
|
2023-08-04 11:13:41 +08:00
|
|
|
go mod tidy && \
|
|
|
|
go build cmd/enterprise.go && \
|
|
|
|
mv enterprise /app/bin && \
|
|
|
|
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"]
|