Skip to content

Commit

Permalink
Update docker API version to match the v20.10 engine version
Browse files Browse the repository at this point in the history
Update the API version to the version set in the distro configuration,
which must match the API version of the balena package.

Change-type: patch
Signed-off-by: Alex Gonzalez <[email protected]>
  • Loading branch information
alexgg committed Jun 13, 2024
1 parent 5f19198 commit 8de8f68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions meta-balena-common/classes/image_types_balena.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ do_rootfs[vardeps] += "BALENA_BOOT_PARTITION_FILES"

# XXX(petrosagg): This should be eventually implemented using a docker-native daemon
IMAGE_CMD:docker () {
DOCKER_IMAGE=$(${IMAGE_CMD_TAR} -cv -C ${IMAGE_ROOTFS} . | DOCKER_API_VERSION=1.22 docker import -)
DOCKER_API_VERSION=1.22 docker save ${DOCKER_IMAGE} > ${BALENA_DOCKER_IMG}
DOCKER_IMAGE=$(${IMAGE_CMD_TAR} -cv -C ${IMAGE_ROOTFS} . | DOCKER_API_VERSION=${BALENA_API_VERSION} docker import -)
DOCKER_API_VERSION=${BALENA_API_VERSION} docker save ${DOCKER_IMAGE} > ${BALENA_DOCKER_IMG}
}

IMAGE_TYPEDEP:hostapp-ext4 = "docker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ do_compile () {
done

IMAGETAG="${PN}:$(date +%s)"
DOCKER_API_VERSION=1.22 docker build --tag ${IMAGETAG} ${B}/work
DOCKER_API_VERSION=1.22 docker save "$IMAGETAG" > ${B}/work/mkfs-hostapp-image.tar
DOCKER_API_VERSION=1.22 docker rmi "$IMAGETAG"
DOCKER_API_VERSION=${BALENA_API_VERSION} docker build --tag ${IMAGETAG} ${B}/work
DOCKER_API_VERSION=${BALENA_API_VERSION} docker save "$IMAGETAG" > ${B}/work/mkfs-hostapp-image.tar
DOCKER_API_VERSION=${BALENA_API_VERSION} docker rmi "$IMAGETAG"

sed -i "s/@IMAGE@/${IMAGETAG}/" ${B}/work/mkfs.hostapp
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ do_compile() {
cp -r "${WORKDIR}"/example_module ${B}/work/

IMAGETAG="${PN}:$(date +%s)"
DOCKER_API_VERSION=1.22 docker build --tag ${IMAGETAG} --build-arg kernel_arch=${ARCH} --build-arg cross_compile_prefix=${DEBIAN_TUPLE} ${B}/work
DOCKER_API_VERSION=1.22 docker rmi "$IMAGETAG"
DOCKER_API_VERSION=${BALENA_API_VERSION} docker build --tag ${IMAGETAG} --build-arg kernel_arch=${ARCH} --build-arg cross_compile_prefix=${DEBIAN_TUPLE} ${B}/work
DOCKER_API_VERSION=${BALENA_API_VERSION} docker rmi "$IMAGETAG"
}

# Explicitly depend on the do_deploy step as we use the deployed artefacts. DEPENDS doesn't cover that
Expand Down

0 comments on commit 8de8f68

Please sign in to comment.