diff --git a/Dockerfile b/Dockerfile index 37ace3d..01c01a7 100755 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,14 @@ RUN apt-get update && apt-get install -y git ffmpeg gosu bash && \ # Set the working directory in the container WORKDIR /app +# Cache-busting mechanism +ARG CACHE_BUST=0 + # Copy the requirements file into the container COPY requirements.txt . -# Install Python dependencies -RUN pip install --no-cache-dir -r requirements.txt +# Force Docker to always run this step +RUN echo $CACHE_BUST && pip install --no-cache-dir --upgrade --force-reinstall -r requirements.txt # Copy application code COPY . . @@ -26,4 +29,4 @@ EXPOSE 7171 # Set entrypoint to handle user permission setup ENTRYPOINT ["/entrypoint.sh"] -CMD ["python", "app.py"] \ No newline at end of file +CMD ["python", "app.py"] diff --git a/builds/dev.build.sh b/builds/dev.build.sh index cd2b82f..35a2804 100755 --- a/builds/dev.build.sh +++ b/builds/dev.build.sh @@ -1 +1 @@ -docker buildx build --no-cache --push --platform linux/amd64,linux/arm64 --tag cooldockerizer93/spotizerr:dev . \ No newline at end of file +docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg CACHE_BUST=$(date +%s) --tag cooldockerizer93/spotizerr:dev . \ No newline at end of file diff --git a/builds/latest.build.sh b/builds/latest.build.sh index 535bf6c..104761e 100755 --- a/builds/latest.build.sh +++ b/builds/latest.build.sh @@ -1 +1 @@ -docker buildx build --no-cache --push --platform linux/amd64,linux/arm64 --tag cooldockerizer93/spotizerr:latest . \ No newline at end of file +docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg CACHE_BUST=$(date +%s) --tag cooldockerizer93/spotizerr:latest .