diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c779de6..13b15ba 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 ab7da8f..1515c8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build*/ +tls/ tmp/ dockerd docker-proxy diff --git a/Dockerfile b/Dockerfile index 4c7f63a..6629d53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,20 @@ # syntax=docker/dockerfile:1 ARG DOCKER_IMAGE_VERSION=26.0.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 . +docker buildx build --file Dockerfile --tag docker-acap: --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 128b13c..810c136 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 \