Skip to content

Commit

Permalink
Fix cache issue in docker builds
Browse files Browse the repository at this point in the history
Fix not using cache for building docker images
  • Loading branch information
shauryag2002 committed Dec 7, 2024
1 parent 9a20757 commit 7ede9e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ jobs:
build-args: |
APP_VERSION=${{ github.sha }}
ADDITIONAL_PLUGS=${{ env.ADDITIONAL_PLUGS }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Create Sentry release
uses: getsentry/action-release@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
with:
load: true
set: |
*.cache-from=type=local,src=/tmp/.buildx-cache
*.cache-to=type=local,dest=/tmp/.buildx-cache-new
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
files: docker-compose.yaml,docker-compose.local.yaml
env:
DOCKER_BUILD_SUMMARY: false
Expand Down
4 changes: 2 additions & 2 deletions docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ RUN pip install pipenv==2024.4.0

RUN python -m venv $APP_HOME/.venv
COPY Pipfile Pipfile.lock $APP_HOME/
RUN pipenv install --deploy --categories "packages"
RUN --mount=type=cache,target=/root/.cache/pip pipenv install --deploy --categories "packages"

COPY plugs/ $APP_HOME/plugs/
COPY install_plugins.py plug_config.py $APP_HOME/
RUN python3 $APP_HOME/install_plugins.py
RUN --mount=type=cache,target=/root/.cache/pip python3 $APP_HOME/install_plugins.py

# ---
FROM base AS runtime
Expand Down

0 comments on commit 7ede9e2

Please sign in to comment.