1 Star 0 Fork 59

bobo/picbed

forked from staugur/sapic 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
staugur 提交于 2020-07-27 20:21 . :bookmark:release 1.8
# -- base python --
FROM python:3.7-alpine AS base
LABEL maintainer=staugur@saintic.com
WORKDIR /picbed
# -- build dependencies with alpine --
#FROM python:3.7-alpine AS build
#ARG ALPINEMIRROR=mirrors.tuna.tsinghua.edu.cn
#ARG PIPMIRROR=https://pypi.tuna.tsinghua.edu.cn/simple
#RUN sed -i "s/dl-cdn.alpinelinux.org/$ALPINEMIRROR/g" /etc/apk/repositories && \
# apk add --no-cache gcc musl-dev libffi-dev make && \
# rm -fr /var/cache/apk/*
#COPY requirements /requirements
#RUN pip install --timeout 30 --index $PIPMIRROR --user --no-cache-dir --no-warn-script-location -r /requirements/all.txt
# -- build dependencies with debian --
FROM python:3.7-slim AS build
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 --
FROM base
ENV LOCAL_PKG="/root/.local"
ENV picbed_isrun=true
COPY --from=build ${LOCAL_PKG} ${LOCAL_PKG}
RUN ln -sf ${LOCAL_PKG}/bin/flask ${LOCAL_PKG}/bin/gunicorn /bin/ && \
ln -sf $(which python) /python && \
sed -i "s#$(which python)#/python#" /bin/gunicorn
COPY src /picbed
ENTRYPOINT ["gunicorn", "app:app", "-c", "picbed.py"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/baitongda/picbed.git
git@gitee.com:baitongda/picbed.git
baitongda
picbed
picbed
master

搜索帮助