Skip to content

Commit 456d3bf

Browse files
committed
Containerfile: fix creation of /tmp
workaround for void-linux/xbps#566
1 parent 77854fe commit 456d3bf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Containerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,27 @@ RUN --mount=type=cache,sharing=locked,target=/target/var/cache/xbps,id=repocache
5353

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

6162
FROM scratch AS image-busybox
6263
COPY --link --from=install-busybox /target /
63-
RUN --mount=type=tmpfs,target=/tmp \
64+
RUN \
6465
for util in $(/usr/bin/busybox --list); do \
6566
[ ! -f "/usr/bin/$util" ] && /usr/bin/busybox ln -sfv busybox "/usr/bin/$util"; \
6667
done; \
68+
install -dm1777 tmp; \
6769
xbps-reconfigure -a; \
6870
rm -rf /var/cache/xbps/*
6971
CMD ["/bin/sh"]
7072

7173
FROM scratch AS image-full
72-
COPY --link --from=install-full /target /
73-
RUN --mount=type=tmpfs,target=/tmp \
74+
COPY --from=install-full /target /
75+
RUN \
76+
install -dm1777 tmp; \
7477
xbps-reconfigure -a; \
7578
rm -rf /var/cache/xbps/*
7679
CMD ["/bin/sh"]

0 commit comments

Comments
 (0)