17 lines
503 B
Docker
17 lines
503 B
Docker
FROM python:3.10
|
|
|
|
# make the 'app' folder the current working directory
|
|
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"]
|