23 lines
577 B
Docker
23 lines
577 B
Docker
# 使用自定义 Docker Registry 中的官方 Python 镜像作为基础镜像
|
|
FROM git.tunpok.com/ching/python-env:latest
|
|
|
|
# 设置工作目录
|
|
WORKDIR /app
|
|
|
|
# 将 requirements.txt 复制到容器中
|
|
COPY requirements.txt ./
|
|
|
|
# download file from cdn
|
|
RUN wget -O /app/pygrocy.tar.gz https://cdn.tunpok.com/pygrocy.tar.gz
|
|
|
|
# install pygrocy
|
|
RUN pip install /app/pygrocy.tar.gz
|
|
|
|
# 安装依赖
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# 将当前目录下的所有文件复制到容器中
|
|
COPY . .
|
|
|
|
# 省略 CMD 指令,因为这个镜像是作为基础镜像使用
|