diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index aec6a88..515d9bd 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -83,7 +83,7 @@ jobs: dockerfile: Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: ACAPARCH=${{ matrix.arch }} + build-args: ARCH=${{ matrix.arch }} outputs: "type=local,dest=build" - name: Get name of EAP-file id: get_eap_file_name diff --git a/.gitignore b/.gitignore index 817e134..e79d5d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build*/ +tls/ tmp/ dockerd docker-compose diff --git a/Dockerfile b/Dockerfile index 29adc63..79ffcc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,21 @@ # syntax=docker/dockerfile:1 -ARG DOCKER_VERSION=26.0.0 +ARG DOCKER_IMAGE_VERSION=26.0.0 ARG DOCKER_COMPOSE_VERSION=v2.25.0 +ARG PROCPS_VERSION=v3.3.17 ARG REPO=axisecp -ARG ACAPARCH=armv7hf +ARG ARCH=armv7hf ARG VERSION=1.13 ARG UBUNTU_VERSION=22.04 ARG NATIVE_SDK=acap-native-sdk -FROM ${REPO}/${NATIVE_SDK}:${VERSION}-${ACAPARCH}-ubuntu${UBUNTU_VERSION} as build_image +FROM ${REPO}/${NATIVE_SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION} AS sdk_image -FROM build_image AS ps -ARG PROCPS_VERSION=v3.3.17 -ARG BUILD_DIR=/build -ARG EXPORT_DIR=/export +FROM sdk_image AS build_image +# hadolint ignore=DL3009 RUN <$BUILD_CACHE \ - && echo ac_cv_func_malloc_0_nonnull=yes >>$BUILD_CACHE +RUN <$BUILD_CACHE + echo ac_cv_func_malloc_0_nonnull=yes >>$BUILD_CACHE +EOF + RUN < --build-arg ACAPARCH= --output . +# Build Docker Compose ACAP image +docker buildx build --file Dockerfile --tag docker-acap-with-compose: --build-arg ARCH= --output . ``` where `` is either `armv7hf` or `aarch64`. `` is the path to an output folder diff --git a/build.sh b/build.sh index 012b547..d1ced07 100755 --- a/build.sh +++ b/build.sh @@ -40,7 +40,7 @@ done # Build and copy out the acap # shellcheck disable=SC2086 -docker buildx build --build-arg ACAPARCH="$arch" \ +docker buildx build --build-arg ARCH="$arch" \ --build-arg HTTP_PROXY="${HTTP_PROXY:-}" \ --build-arg HTTPS_PROXY="${HTTPS_PROXY:-}" \ --file Dockerfile \