我是Docker的新手。我构建了一个python flask应用程序,现在我想为其创建一个docker映像。但是,在我的应用程序中,我使用python子进程来执行Caliber命令。我使用brew在我的本地计算机上安装了Calibre。现在我想知道它如何在“ FROM python:3.6”环境下与docker一起工作?
我是否只需在我的dockerfile文件中追加“啤酒桶安装口径”?还是我需要配置自制软件等等?
以下是我当前的dockerfile:
FROM python:3.6
ENV FLASK_APP run.py
COPY run.py gunicorn-cfg.py requirements.txt .env ./
COPY app app
RUN pip install -r requirements.txt
EXPOSE 5005
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
提前致谢!
python:3.6
通过运行我们可以看到基于Debian:
docker run -it python:3.6 /bin/bash -c 'cat /etc/*release'
这给我们:
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Debian没有预装brew,但是它带有apt
带有debian.org
存储库的软件包管理器,其中包含calibre
软件包:
RUN apt-get update
RUN apt-get install -y calibre
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句