Skip to content

Commit

Permalink
Containerfile: fix creation of /tmp
Browse files Browse the repository at this point in the history
workaround for void-linux/xbps#566
  • Loading branch information
classabbyamp committed Aug 9, 2023
1 parent 77854fe commit 456d3bf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,27 @@ RUN --mount=type=cache,sharing=locked,target=/target/var/cache/xbps,id=repocache

FROM scratch AS image-default
COPY --link --from=install-default /target /
RUN --mount=type=tmpfs,target=/tmp \
RUN \
install -dm1777 tmp; \
xbps-reconfigure -a; \
rm -rf /var/cache/xbps/*
CMD ["/bin/sh"]

FROM scratch AS image-busybox
COPY --link --from=install-busybox /target /
RUN --mount=type=tmpfs,target=/tmp \
RUN \
for util in $(/usr/bin/busybox --list); do \
[ ! -f "/usr/bin/$util" ] && /usr/bin/busybox ln -sfv busybox "/usr/bin/$util"; \
done; \
install -dm1777 tmp; \
xbps-reconfigure -a; \
rm -rf /var/cache/xbps/*
CMD ["/bin/sh"]

FROM scratch AS image-full
COPY --link --from=install-full /target /
RUN --mount=type=tmpfs,target=/tmp \
COPY --from=install-full /target /
RUN \
install -dm1777 tmp; \
xbps-reconfigure -a; \
rm -rf /var/cache/xbps/*
CMD ["/bin/sh"]

0 comments on commit 456d3bf

Please sign in to comment.