unframework / licheepi-nano-buildroot

Config files for full Lichee Pi Nano Linux image build
GNU General Public License v3.0
114 stars 29 forks source link

Docker error Ubuntu 2022.10 #26

Closed peterbmckinley closed 9 months ago

peterbmckinley commented 1 year ago

Note the following error occurs about half an hour after "tar: Skipping to next header" is printed

peter@asus:~/licheepi-nano-buildroot$ sudo docker build --output type=tar,dest=- . | tar x -C dist tar: This does not look like a tar archive tar: Skipping to next header The command '/bin/sh -c make' returned a non-zero code: 2 tar: Exiting with failure status due to previous errors

cjameshuff commented 1 year ago

Ran into the same issue using Ubuntu 22.04.2. Doing docker build --output type=tar,dest=test.tar . shows the build apparently successfully completing, but the output doesn't appear anywhere. Looking into the --output option reveals:

This feature requires the BuildKit backend. You can either enable BuildKit or use the buildx plugin which provides more output type options.

It appears that BuildKit can be enabled by setting the DOCKER_BUILDKIT environment variable. After additionally creating a dist directory, this command appears to have worked (I have not yet tested the resulting image):

DOCKER_BUILDKIT=1 docker build --output type=tar,dest=- . | tar x -C dist

DHWill commented 1 year ago

I'm having this issue. Which results in no output file.

:~/licheepi-nano-buildroot$ sudo DOCKER_BUILDKIT=1 docker build [+] Building 3201.1s (29/30)
=> [internal] load .dockerignore
=> => transferring context: 2B
=> [internal] load metadata for docker.io/library/ubuntu:18.04
=> [internal] load build context
=> => transferring context: 12.89kB
=> [base 1/6] FROM docker.io/library/ubuntu:18.04
=> [base 2/6] RUN apt-get update
=> [base 3/6] RUN apt-get install -qy bc bison build-essential bzr chrpath c => [base 4/6] RUN update-locale LC_ALL=C
=> [base 5/6] WORKDIR /root/buildroot
=> [base 6/6] RUN wget -qO- http://buildroot.org/downloads/buildroot-2023.02.tar.gz | tar --strip-co => [sdk 1/8] WORKDIR /root/licheepi-nano-sdk
=> [sdk 2/8] RUN echo 'name: LICHEEPI_NANO_SDK' >> external.desc
=> [sdk 3/8] RUN echo 'desc: LicheePi Nano SDK only' >> external.desc
=> [sdk 4/8] RUN touch external.mk Config.in
=> [sdk 5/8] COPY configs/licheepi_nano_sdk_defconfig configs/
=> [sdk 6/8] WORKDIR /root/buildroot
=> [sdk 7/8] RUN BR2_EXTERNAL=/root/licheepi-nano-sdk make licheepi_nano_sdk_defconfig
=> [sdk 8/8] RUN make sdk
=> [main 1/11] COPY --from=sdk /root/buildroot/output/images/arm-buildroot-linux-gnueabi_sdk-buildr => [main 2/11] WORKDIR /root/licheepi-nano
=> [main 3/11] COPY board/ board/
=> [main 4/11] COPY configs/ configs/
=> [main 5/11] COPY Config.in external.desc external.mk ./
=> [main 6/11] WORKDIR /root/buildroot
=> [main 7/11] RUN BR2_EXTERNAL=/root/licheepi-nano make licheepi_nano_defconfig
=> [main 8/11] RUN make toolchain
=> [main 9/11] RUN make linux-source
=> [main 10/11] RUN make uboot-source
=> [main 11/11] RUN make
=> [dist 1/1] COPY --from=main /root/buildroot/output/images/ .
tar: dest: Cannot open: No such file or directory tar: Error is not recoverable: exiting now

unframework commented 9 months ago

Updated instructions to mention BuildKit: 371ddaa.

Also mentioned that dist folder should be created first: 05b791c.

Thanks for reporting these!