1 Star 0 Fork 59

lailing/sapic

forked from staugur/sapic 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 817 Bytes
一键复制 编辑 原始数据 按行查看 历史
staugur 提交于 2022-12-28 15:07 . update readme & misc
# -- build dependencies with debian(multiarch) --
FROM python:3.8-slim AS build
LABEL maintainer=me@tcw.im
ARG PIPMIRROR=https://pypi.tuna.tsinghua.edu.cn/simple
COPY requirements /requirements
RUN pip install --timeout 30 --index $PIPMIRROR --user --no-cache-dir --no-warn-script-location -r /requirements/all.txt
# -- app environment(multiarch) --
FROM python:3.8-alpine
ENV LOCAL_PKG="/root/.local"
ENV sapic_isrun=true
COPY --from=build ${LOCAL_PKG} ${LOCAL_PKG}
RUN apk upgrade --no-cache && \
apk add --no-cache libgcc libstdc++ gcompat && \
ln -sf ${LOCAL_PKG}/bin/flask ${LOCAL_PKG}/bin/gunicorn /bin/ && \
ln -sf $(which python) /python && \
sed -i "s#$(which python)#/python#" /bin/gunicorn
WORKDIR /picbed
COPY src /picbed
EXPOSE 9514
ENTRYPOINT ["gunicorn", "app:app", "-c", "sapicd.py"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/lailing/picbed.git
git@gitee.com:lailing/picbed.git
lailing
picbed
sapic
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385