feat: Use tmpfs mount for /tmp and /var (#67)
This allows scripts to create as many files as they need in /tmp and /var without having to worry about them being included in the final image. Now the last instruction will only be the ostree container commit
This commit is contained in:
parent
98398788f7
commit
369fbab03f
1 changed files with 3 additions and 2 deletions
|
|
@ -72,6 +72,8 @@ COPY {{ src }} {{ dest }}
|
|||
{%- endif %}
|
||||
{%- else %}
|
||||
RUN \
|
||||
--mount=type=tmpfs,target=/tmp \
|
||||
--mount=type=tmpfs,target=/var \
|
||||
--mount=type=bind,from=stage-config,src=/config,dst=/tmp/config,rw \
|
||||
--mount=type=bind,from=stage-modules,src=/modules,dst=/tmp/modules,rw \
|
||||
--mount=type=bind,from=stage-exports,src=/exports.sh,dst=/tmp/exports.sh \
|
||||
|
|
@ -81,5 +83,4 @@ RUN \
|
|||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
|
||||
RUN rm -rf /tmp/* /var/* && ostree container commit
|
||||
RUN ostree container commit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue