22 lines
773 B
Docker
22 lines
773 B
Docker
FROM python:3.10
|
|
|
|
RUN apt update && apt install -y xfonts-base xfonts-75dpi \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb \
|
|
&& dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.deb \
|
|
&& rm wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
|
|
|
|
WORKDIR /code
|
|
|
|
# copy both 'package.json' and 'package-lock.json' (if available)
|
|
COPY ./requirements.txt /code/requirements.txt
|
|
|
|
# install project dependencies
|
|
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
|
# copy project files and folders to the current working directory (i.e. 'app' folder)
|
|
COPY ./app /code/app
|
|
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|