python-env-docker/Dockerfile
Ching 8bec2fe1c7
All checks were successful
continuous-integration/drone/push Build is passing
feat: Add pygrocy installation via tar.gz file
2024-03-04 22:39:09 +08:00

23 lines
583 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-2-0-1.tar.gz
# install pygrocy
RUN pip install /app/pygrocy.tar.gz
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
# 将当前目录下的所有文件复制到容器中
COPY . .
# 省略 CMD 指令,因为这个镜像是作为基础镜像使用