From a7849bb02902019dfffaf19ec0682722cdaf07c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Mon, 23 May 2022 11:35:11 +0200 Subject: [PATCH] Fix bug docker build /cache --- Dockerfile.template | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile.template b/Dockerfile.template index b58dd92..d4cf77b 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -6,21 +6,20 @@ RUN apt-get update && apt-get install -y \ libblas-dev liblapack-dev liblapacke-dev gfortran \ && rm -rf /var/lib/apt/lists/* -RUN mkdir /cache/ /senpy-plugins /data/ +RUN mkdir -p /cache/ /senpy-plugins /data/ VOLUME /data/ ENV PIP_CACHE_DIR=/cache/ SENPY_DATA=/data -ONBUILD COPY . /senpy-plugins/ -ONBUILD RUN python -m senpy --only-install -f /senpy-plugins -ONBUILD WORKDIR /senpy-plugins/ - - WORKDIR /usr/src/app COPY test-requirements.txt requirements.txt extra-requirements.txt /usr/src/app/ RUN pip install --no-cache-dir -r test-requirements.txt -r requirements.txt -r extra-requirements.txt COPY . /usr/src/app/ RUN pip install --no-cache-dir --no-index --no-deps --editable . +ONBUILD COPY . /senpy-plugins/ +ONBUILD RUN python -m senpy --only-install -f /senpy-plugins +ONBUILD WORKDIR /senpy-plugins/ + ENTRYPOINT ["python", "-m", "senpy", "-f", "/senpy-plugins/", "--host", "0.0.0.0"]