Skip to content

Commit

Permalink
Dockerfile.rootfs: use bsdtar as tar fails sometimes
Browse files Browse the repository at this point in the history
This is a known issue with overlayfs discussed here:
coreos/bugs#1095
  • Loading branch information
lerwys committed Nov 1, 2018
1 parent d1c1422 commit b95fd2f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile.rootfs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ WORKDIR /

COPY rootfs.tar.gz /

RUN mkdir -p /rootfs && \
# Use bsdtar, as tar fails with:
# "Directory renamed before its status could be extracted"
RUN echo "nameserver 10.0.0.71" >> /etc/resolv.conf && \
apt-get update && \
apt-get install -y bsdtar && \
cp $(which tar) $(which tar)~ && \
ln -sf $(which bsdtar) $(which tar) && \
mkdir -p /rootfs && \
cd /rootfs && \
tar -xvpzf /rootfs.tar.gz --numeric-owner && \
rm -rf /rootfs.tar.gz
rm -rf /rootfs.tar.gz && \
mv $(which tar)~ $(which tar)

0 comments on commit b95fd2f

Please sign in to comment.