1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
FROM golang:1.15
MAINTAINER linzhenglinzheng@qq.com
WORKDIR /aegean
ENV GOPROXY="https://goproxy.cn,direct"
ENV GO111MODULE="on"
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
go build -o aegean \
-ldflags "-X main.version=${VERSION}" -v
ENTRYPOINT ["/aegean/aegean"]
FROM python:3.7
LABEL maintainer='linzhenglinzheng@qq.com'
RUN /usr/local/bin/python -m pip install --upgrade \
pip -i https://mirrors.bfsu.edu.cn/pypi/web/simple/
COPY ./requirements.txt /tmp/requirements.txt
RUN --mount=type=cache,mode=0777,target=/root/.cache/pip \
pip install -r /tmp/requirements.txt \
-i https://mirrors.bfsu.edu.cn/pypi/web/simple/
ENTRYPOINT ["python", "/opt/chinese_text_vector/server.py"]
|