generated from container/tmpl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
890 B
25 lines
890 B
FROM python:3.8.16 AS python_base
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com && \
|
|
pip install -r requirements_linux.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com && \
|
|
cp SimHei.ttf /usr/local/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf && \
|
|
pyinstaller -F main.py --distpath=.
|
|
|
|
FROM debian:11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=python_base /app/main /app/config.ini /app/SimHei.ttf ./
|
|
|
|
RUN cp -a /etc/apt/sources.list /etc/apt/sources.list.bak && \
|
|
sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list && \
|
|
sed -i "s@http://security.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list
|
|
|
|
RUN apt-get update && apt-get install libreoffice -y && \
|
|
cp SimHei.ttf /usr/share/fonts/
|
|
|
|
CMD ["./main"]
|
|
|