mirror of http://gitlab.batiao8.com/yic/film.git
21 lines
445 B
Docker
21 lines
445 B
Docker
|
FROM registry.cn-shanghai.aliyuncs.com/devcon/godev:v1.0.14
|
||
|
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 && \
|
||
|
export PATH=$PATH:$GOROOT/bin && \
|
||
|
go mod tidy && \
|
||
|
go build cmd/film.go && \
|
||
|
mv film /app/bin && \
|
||
|
cp -r conf /app && \
|
||
|
cp start.sh /app && \
|
||
|
chmod +x /app/start.sh
|
||
|
|
||
|
WORKDIR /app
|
||
|
EXPOSE 9263
|
||
|
|
||
|
CMD ["/app/start.sh"]
|