Do not compress rootfs archive in mkimage.sh.

* This wastes CPU time for compressing and decompressing.

Signed-off-by: Robin Schneider <ypid@riseup.net>
This commit is contained in:
Robin Schneider 2015-06-14 20:51:11 +02:00
parent ee40f29712
commit 0030df868a
No known key found for this signature in database
GPG Key ID: 489A4D5EC353C98A
1 changed files with 3 additions and 3 deletions

View File

@ -71,18 +71,18 @@ nameserver 8.8.8.8
nameserver 8.8.4.4 nameserver 8.8.4.4
EOF EOF
tarFile="$dir/rootfs.tar.xz" tarFile="$dir/rootfs.tar"
touch "$tarFile" touch "$tarFile"
( (
set -x set -x
tar --numeric-owner -caf "$tarFile" -C "$rootfsDir" --transform='s,^./,,' . tar --numeric-owner -cf "$tarFile" -C "$rootfsDir" --transform='s,^./,,' .
) )
echo >&2 "+ cat > '$dir/Dockerfile'" echo >&2 "+ cat > '$dir/Dockerfile'"
cat > "$dir/Dockerfile" <<'EOF' cat > "$dir/Dockerfile" <<'EOF'
FROM scratch FROM scratch
ADD rootfs.tar.xz / ADD rootfs.tar /
EOF EOF
# if our generated image has a decent shell, let's set a default command # if our generated image has a decent shell, let's set a default command