I am running a build with docker build -t .
Building on Ubuntu 20.04 platform target colibri, imx8x, torizon
previously ran correctly ( around 1 year ago last time build performed ) now stopping on errors at RUN command
any help would be appreciated
Output of docker build:
…
=> ERROR [deploy-container 3/10] RUN apt update 0.2s
[deploy-container 3/10] RUN apt update:
0.239 exec /bin/sh: exec format error
Dockerfile:36
34 | COPY --from=cross-container /project/build/* /usr/local/bin/
35 |
36 | >>> RUN apt update
37 | RUN apt install nano -y
38 | RUN apt install ser2net -y
ERROR: failed to solve: process “/bin/sh -c apt update” did not complete successfully: exit code: 1
ooo
Docker File:
ARG CROSS_TC_IMAGE_ARCH=armhf
ARG CROSS_TC_DOCKER_REGISTRY=torizon
ARG BASE_NAME=debian
ARG IMAGE_ARCH=linux/arm/v7
ARG IMAGE_TAG=2-bullseye
ARG DOCKER_REGISTRY=torizon
First stage, x86_64 build container
FROM $CROSS_TC_DOCKER_REGISTRY/debian-cross-toolchain-$CROSS_TC_IMAGE_ARCH:$IMAGE_TAG AS cross-container
ARG GCC_PREFIX=arm-linux-gnueabihf
install the libpiod development dependencies
RUN apt-get -y update && apt-get -y upgrade && apt-get install -y
libgpiod-dev:$CROSS_TC_IMAGE_ARCH
libgpiod2:$CROSS_TC_IMAGE_ARCH
nano:$CROSS_TC_IMAGE_ARCH \
&& apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*
copy project source
WORKDIR /project
COPY src/ /project
COPY ser2net.conf /project
compile
RUN mkdir build && cd build
&& $GCC_PREFIX-gcc -Wall -g -D_GNU_SOURCE -o qse
…/iio_utils.c …/main.c …/serCmd.c …/adc_utils.c …/pwm_utils.c
Second stage, container for target
FROM --platform=$IMAGE_ARCH $DOCKER_REGISTRY/$BASE_NAME:$IMAGE_TAG AS deploy-container
get the compiled program from the Build stage
COPY --from=cross-container /project/build/* /usr/local/bin/
RUN apt update <<<<<<<< Fails at this point with message above
…