Skip to content

Commit

Permalink
feat: Make use of rpm-ostree cache (#68)
Browse files Browse the repository at this point in the history
After setting up the tmpfs mount for /var, rpm-ostree started to not
have cache throughout the single build. This creates a cache for
rpm-ostree that is tied to the specific recipe being built. This will
allow subsequent builds of a recipe to be faster and not interfere with
the cache of another recipe, especially if they are on different OS
versions
  • Loading branch information
gmpinder authored Feb 19, 2024
1 parent 498deb6 commit ca6cd80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions templates/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ RUN \
--mount=type=bind,from=stage-modules,src=/modules,dst=/tmp/modules,rw \
{%- endif %}
--mount=type=bind,from=stage-exports,src=/exports.sh,dst=/tmp/exports.sh \
--mount=type=cache,dst=/var/cache/rpm-ostree,id=rpm-ostree-cache-{{ recipe.name }}-{{ recipe.image_version }},sharing=locked \
chmod +x /tmp/modules/{{ type }}/{{ type }}.sh \
&& source /tmp/exports.sh && /tmp/modules/{{ type }}/{{ type }}.sh '{{ self::print_module_context(module) }}'
{%- endif %}
Expand Down

0 comments on commit ca6cd80

Please sign in to comment.