Skip to content

Commit

Permalink
Remove armv7hf for container-example
Browse files Browse the repository at this point in the history
  • Loading branch information
isak-jakobsson authored and pataxis committed Oct 8, 2024
1 parent f777461 commit 0ec36a7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 29 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/container-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ jobs:
strategy:
matrix:
include:
- arch: armv7hf
platformarch: "linux/arm/v7"
axis-os: 11.11.70
- arch: aarch64
platformarch: "linux/arm64/v8"
axis-os: 11.11.70
axis-os: 12.0.89
env:
EXREPO: acap-native-examples
EXNAME: container-example
Expand All @@ -33,7 +30,7 @@ jobs:
run: |
docker image rm -f $imagetag
cd $EXNAME
docker pull --platform=${{ matrix.platformarch}} alpine:$alpinetag
docker pull --platform=${{ matrix.platformarch }} alpine:$alpinetag
docker save -o alpine.tar alpine:$alpinetag
docker build --no-cache --tag $imagetag --build-arg ARCH=${{ matrix.arch }} .
docker cp $(docker create $imagetag):/opt/app ./build
Expand Down
2 changes: 1 addition & 1 deletion container-example/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

ARG ARCH=armv7hf
ARG ARCH=aarch64
ARG VERSION=1.15
ARG UBUNTU_VERSION=22.04
ARG REPO=axisecp
Expand Down
38 changes: 15 additions & 23 deletions container-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,38 +98,31 @@ Standing in your working directory run the following commands:
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
##### Build the application for armv7hf

Pull the [Alpine linux container image][alpine] for armv7hf and save it to a
.tar file, then build the application:
Pull the [Alpine linux container image][alpine] and save it to a .tar file.

```sh
docker pull --platform="linux/arm/v7" alpine:3.19.1
docker pull --platform="linux/arm64/v8" alpine:3.19.1
docker save -o alpine.tar alpine:3.19.1
docker build --build-arg ARCH=armv7hf --tag container-example:armv7hf .
docker cp $(docker create container-example:armv7hf):/opt/app ./build-armv7hf
````

Build the application:

```sh
docker build --tag <APP_IMAGE> .
```

##### Build the application for aarch64
`<APP_IMAGE>` is the name to tag the image with, e.g., `container-example:1.0`.

Pull the [Alpine linux container image][alpine] for aarch64 and save it to a
.tar file, then build the application:
Copy the result from the container image to a local directory `build`:

```sh
docker pull --platform="linux/arm64/v8" alpine:3.19.1
docker save -o alpine.tar alpine:3.19.1
docker build --build-arg ARCH=aarch64 --tag container-example:aarch64 .
docker cp $(docker create container-example:aarch64):/opt/app ./build-aarch64
docker cp $(docker create <APP_IMAGE>):/opt/app ./build
```

##### Extract the application

The `build-armv7hf` and `build-aarch64` directories contain the build
artifacts, where the ACAP application is found with suffix `.eap`, depending on
which SDK architecture that was chosen, one of these files should be found:
The `build` directory contains the build artifacts, where the ACAP
application is found with suffix `.eap`. This file should be found:

- `Container_Example_1_0_0_aarch64.eap`
- `Container_Example_1_0_0_armv7hf.eap`
- `Container_Example_1_0_0_aarch64.eap`.

#### Install your application

Expand All @@ -142,9 +135,8 @@ http://<AXIS_DEVICE_IP>/index.html#apps
- Click on the tab `Apps` in the device GUI
- Enable `Allow unsigned apps` toggle
- Click `(+ Add app)` button to upload the application file
- Browse to the newly built ACAP application, depending on architecture:
- Browse to the newly built ACAP application:
- `Container_Example_1_0_0_aarch64.eap`
- `Container_Example_1_0_0_armv7hf.eap`
- Click `Install`
- Run the application by enabling the `Start` switch

Expand Down

0 comments on commit 0ec36a7

Please sign in to comment.