-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (16 loc) · 642 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (16 loc) · 642 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ARG PYTHON_VERSION=3.7-alpine
FROM python:$PYTHON_VERSION
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN apk upgrade --update && \
apk add --virtual build-dependencies build-base gcc wget git python3-dev musl-dev && \
apk add --no-cache --upgrade jpeg-dev zlib-dev libjpeg && \
python3 -m ensurepip && \
pip3 install --no-cache --upgrade pip setuptools && \
python3 -m pip install -U --force-reinstall pip && \
pip3 install --no-cache-dir -r requirements.txt && \
rm -rf .git/ .github/ *.md && \
apk --purge del build-dependencies && \
rm -rf /var/cache/apk/*
EXPOSE 8000
CMD ["uvicorn", "server:app"]