parent
4a4b03836d
commit
ddce943c33
@ -1,10 +1,10 @@ |
||||
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse |
||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse |
||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse |
||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse |
||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse |
||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse |
||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse |
||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse |
||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse |
||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse |
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
@ -0,0 +1,24 @@ |
||||
FROM python:3.9-alpine3.13 as build |
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ |
||||
&& apk update \ |
||||
&& apk add git gcc g++ musl-dev libffi-dev libressl-dev make |
||||
WORKDIR /install |
||||
COPY requirements.txt /install/requirements.txt |
||||
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r /install/requirements.txt \ |
||||
&& mkdir -p /install/lib/python3.9/site-packages \ |
||||
&& cp -rp /usr/local/lib/python3.9/site-packages /install/lib/python3.9 \ |
||||
&& cp -p /usr/local/bin/uvicorn /install/uvicorn |
||||
|
||||
|
||||
FROM python:3.9-alpine3.13 |
||||
|
||||
# This hack is widely applied to avoid python printing issues in docker containers. |
||||
# See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13 |
||||
ENV PYTHONUNBUFFERED=1 |
||||
|
||||
COPY --from=build /install/lib /usr/local/lib |
||||
COPY --from=build /install/uvicorn /usr/local/bin/uvicorn |
||||
|
||||
WORKDIR /code |
||||
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] |
@ -0,0 +1,6 @@ |
||||
fastapi |
||||
python-multipart |
||||
python_jose[cryptography] |
||||
SQLAlchemy[sqlite] |
||||
uvicorn[standard] |
||||
passlib[bcrypt] |
Loading…
Reference in new issue