I am new to docker. I built a python flask application and now I would like to create a docker image for it. However, in my app, I used python subprocess to execute Calibre command. I installed Calibre on my local machine using brew. Now I wonder how it works with docker under "FROM python:3.6" environment?
Do I simply just append "brew cask install calibre" in my dockerfile? Or I need to configure the homebrew and so on?
Below is my current 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"]
Thanks in advance!
We can see
python:3.6
is based on Debian by running:This gives us:
Debian doesn't come with brew pre-installed, however, it comes with the
apt
package manager withdebian.org
repositories, which contain thecalibre
package: