feat(download):增加虎标档案模板的下载,并在Docker镜像中加入下载支持。

This commit is contained in:
徐涛
2022-08-16 15:06:57 +08:00
parent 5fac9a7da4
commit 17e1964bcd
4 changed files with 63 additions and 0 deletions

View File

@@ -10,11 +10,20 @@ ADD . /app
RUN CGO_ENABLED=0 GOOS=linux go build -tags=jsoniter -v -o server .
FROM alpine:latest AS production
RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/main/" > /etc/apk/repositories
RUN apk add --no-cache tzdata
RUN apk update \
&& apk upgrade \
&& apk add --no-cache bash \
bash-doc \
bash-completion \
&& rm -rf /var/cache/apk/* \
ENV TZ=Asia/Shanghai
RUN mkdir /app
WORKDIR /app
COPY --from=builder /app/server .
COPY settings.yaml .
COPY regions.csv .
RUN mkdir /app/assets
COPY ./assets/* /app/assets
CMD ["./server"]