You are not logged in.

#1 2022-02-24 01:17:47

matty_r
Member
Registered: 2015-10-10
Posts: 12

Building docker image fails

Hi all,

I'm trying to build the Arch Linux docker image, and it's currently failing (output below) :

Sending build context to Docker daemon  409.2MB
Step 1/10 : FROM alpine:3.12 AS verify
 ---> b0925e081921
Step 2/10 : COPY base.tar.xz /
 ---> Using cache
 ---> 6c74243c646f
Step 3/10 : RUN apk add --no-cache curl bash
 ---> Using cache
 ---> b215df4cdc67
Step 4/10 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> 4541a4eb8de0
Step 5/10 : RUN ROOTFS="base.tar.xz" &&     sha256sum -c <<< "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  base.tar.xz" &&     mkdir /rootfs &&     tar -C /rootfs --extract --file "${ROOTFS}"
 ---> Running in 970267d0701a
base.tar.xz: OK
tar: short read
The command '/bin/bash -c ROOTFS="base.tar.xz" &&     sha256sum -c <<< "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  base.tar.xz" &&     mkdir /rootfs &&     tar -C /rootfs --extract --file "${ROOTFS}"' returned a non-zero code: 1
make: *** [Makefile:65: image-base] Error 1

Offline

#2 2022-02-24 01:51:11

matty_r
Member
Registered: 2015-10-10
Posts: 12

Re: Building docker image fails

Did some further testing and it appears this step is producing a 0 byte file:

cd /home/admin/custom-arch/base/archlinux-docker/output; xz -9 -T0 -f base.tar; sha256sum base.tar.xz > base.tar.xz.SHA256

Specifically:

xz -9 -T0 -f base.tar

if I run it on it's own, with verbose output I get the following (it fails):

admin@system output]$ xz -9 -T0 -f base.tar -v
base.tar (1/1)
Killed%          4.2 MiB / 18.9 MiB = 0.220   5.7 MiB/s       0:03 

Edit:

removing -T0 appears to resolve the problem, by the looks of things this isn't necessary anyway.

Last edited by matty_r (2022-02-24 01:52:13)

Offline

Board footer

Powered by FluxBB