File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 11FROM python:3.12-slim
22
3- # Cache busting argument (set during build to force fresh layers)
4- ARG CACHEBUST=4
5-
6- # Use CACHEBUST to invalidate cache when needed (this layer changes when CACHEBUST changes)
7- RUN echo "Cache bust: $CACHEBUST" > /tmp/cachebust
8-
93# Install system dependencies including nginx
104RUN apt-get update && apt-get install -y --no-install-recommends \
115 git \
@@ -20,17 +14,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2014
2115WORKDIR /opt/dagster/app
2216
23- # Copy requirements and install Python dependencies
17+ # Copy requirements and install Python dependencies (these change less frequently)
2418COPY requirements.txt requirements-dashboard.txt ./
2519RUN pip install --no-cache-dir -r requirements.txt && \
2620 pip install --no-cache-dir -r requirements-dashboard.txt
2721
28- # Copy application code
22+ # Cache busting argument (set during build to force fresh layers)
23+ ARG CACHEBUST=5
24+
25+ # Use CACHEBUST to invalidate cache when needed (this layer changes when CACHEBUST changes)
26+ # This must come BEFORE copying application code to ensure fresh code on force rebuild
27+ RUN echo "Cache bust: $CACHEBUST" > /tmp/cachebust
28+
29+ # Copy application code (this will now be invalidated by CACHEBUST when force rebuilding)
2930COPY anomstack ./anomstack
3031COPY dashboard ./dashboard
3132COPY metrics ./metrics
3233
33- # Capture git commit hash for version info
34+ # Capture git commit hash for version info (must be after code copy to track the right version)
3435ARG ANOMSTACK_BUILD_HASH
3536ENV ANOMSTACK_BUILD_HASH=${ANOMSTACK_BUILD_HASH}
3637
You can’t perform that action at this time.
0 commit comments