Browse Source

Merge pull request 'fix: 🐛 移除 Dockerfile 中的多余文件复制,确保配置文件正确复制到容器' (#29) from cjl-dev into master

Reviewed-on: http://120.26.116.243:3000/root/model-lab/pulls/29
master
chenjiale 1 month ago
parent
commit
5546b5dfc9
  1. 2
      .drone.yml
  2. 7
      Dockerfile

2
.drone.yml

@ -22,7 +22,7 @@ steps:
- echo "=== BUILD STAGE PWD ==="
- pwd
- ls -l
- docker build --no-cache -t alert-python:latest -f Dockerfile .
- docker build -t alert-python:latest -f Dockerfile .
- name: run python container
image: docker

7
Dockerfile

@ -18,8 +18,11 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN rm -rf /app/config.py
COPY . .
COPY config.py /app/config.py
COPY app.py /app/app.py
COPY *.py /app/
COPY requirements.txt /app/
RUN mkdir -p /opt/alert/model-lab \
&& cp /app/config.py /opt/alert/model-lab/config.py

Loading…
Cancel
Save