Skip to content

Commit

Permalink
Docker: Use Crystal compiler cache in docker builds (#5163)
Browse files Browse the repository at this point in the history
Adding the compiler cache reduces the build times on repeated
builds significantly
  • Loading branch information
syeopite committed Feb 26, 2025
2 parents 6ac74f4 + e2df12b commit f9b9e85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml

RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN if [[ "${release}" == 1 ]] ; then \
RUN --mount=type=cache,target=/root/.cache/crystal if [[ "${release}" == 1 ]] ; then \
crystal build ./src/invidious.cr \
--release \
--static --warnings all \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"

RUN if [[ "${release}" == 1 ]] ; then \
RUN --mount=type=cache,target=/root/.cache/crystal if [[ "${release}" == 1 ]] ; then \
crystal build ./src/invidious.cr \
--release \
--static --warnings all \
Expand Down

0 comments on commit f9b9e85

Please sign in to comment.