Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let docker build output eap-file #164

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@ RUN <<EOF
EOF

ENTRYPOINT [ "/opt/axis/acapsdk/sysroots/x86_64-pokysdk-linux/usr/bin/eap-install.sh" ]

FROM scratch AS binaries

COPY --from=build /opt/app/*.eap /
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,12 @@ To build the Docker ACAP use docker buildx with the provided Dockerfile:

```sh
# Build Docker ACAP image
docker buildx build --file Dockerfile --tag docker-acap:<ARCH> --build-arg ACAPARCH=<ARCH> .
docker buildx build --file Dockerfile --tag docker-acap:<ARCH> --build-arg ACAPARCH=<ARCH> --output <build-folder> .
```

where `<ARCH>` is either `armv7hf` or `aarch64`.

To extract the Docker ACAP eap-file use docker cp to copy it to a `build` folder:

```sh
docker cp "$(docker create "docker-acap:<ARCH>")":/opt/app/ ./build
```
where `<ARCH>` is either `armv7hf` or `aarch64`. `<build-folder>` is the path to an output folder
on your machine, eg. `build`. This will be created for you if not already existing.
Once the build has completed the Docker ACAP eap-file can be found in the `<build-folder>`.

## Installing a locally built Docker ACAP

Expand Down
5 changes: 2 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ docker buildx build --build-arg ACAPARCH="$arch" \
--file Dockerfile \
$progress_arg \
$cache_arg \
--tag "$imagetag" .

docker cp "$(docker create "$imagetag")":/opt/app/ ./build-"$arch"
--tag "$imagetag" \
--output build-"$arch" .
Loading