You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
612 B
Docker
23 lines
612 B
Docker
# pull official base image
|
|
FROM python:3.8.1-alpine
|
|
|
|
# set work directory
|
|
WORKDIR /opt/fast_api
|
|
|
|
# set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# copy requirements file
|
|
COPY ./requirements.txt /opt/fast_api/requirements.txt
|
|
|
|
# install dependencies
|
|
RUN set -eux \
|
|
&& apk add --no-cache --virtual .build-deps build-base \
|
|
libressl-dev libffi-dev gcc musl-dev python3-dev postgresql-dev \
|
|
&& pip install --upgrade pip setuptools wheel \
|
|
&& pip install -r /opt/fast_api/requirements.txt \
|
|
&& rm -rf /root/.cache/pip
|
|
|
|
# copy project
|
|
COPY ./app /opt/fast_api/ |