Skip to content

Commit 3d402b4

Browse files
authored
Upgrade binfmt and update build instructions (#432)
Signed-off-by: Wouter Born <[email protected]>
1 parent b6e07b8 commit 3d402b4

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -515,26 +515,23 @@ For more information on this see the [Docker documentation](https://docs.docker.
515515
Checkout the GitHub repository, change to a directory containing a Dockerfile (e.g. `/debian`) and then run these commands to build and run a Docker image for your current platform:
516516

517517
```shell
518-
$ docker build --build-arg JAVA_VERSION=11 --build-arg OPENHAB_VERSION=4.0.3 --tag openhab/openhab .
518+
$ docker build --build-arg JAVA_VERSION=17 --build-arg OPENHAB_VERSION=4.0.3 --tag openhab/openhab .
519519
$ docker run openhab/openhab
520520
```
521521

522-
To be able to build the same image for other platforms (e.g. arm/v7, arm64 on amd64) Docker CE 19.03 with BuildKit support can be used.
522+
To be able to build the same image for other platforms (e.g. arm/v7, arm64 on amd64) Docker CE with BuildKit support can be used.
523523

524-
First enable BuildKit support, configure QEMU binary formats and a builder using:
524+
First configure QEMU binary formats and a builder using:
525525

526526
```shell
527-
$ echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
528-
$ export DOCKER_CLI_EXPERIMENTAL=enabled
529-
$ docker run --privileged --rm tonistiigi/binfmt:qemu-v6.1.0 --install all
530-
$ sudo systemctl restart docker
527+
$ docker run --privileged --rm tonistiigi/binfmt:qemu-v8.0.4 --install all
531528
$ docker buildx create --name builder --use
532529
```
533530

534531
Change to a directory containing a Dockerfile (e.g. `/debian`) and then use the following command to build an ARMv7 image:
535532

536-
```
537-
$ docker buildx build --build-arg JAVA_VERSION=11 --build-arg OPENHAB_VERSION=4.0.3 --platform linux/arm/v7 --tag openhab/openhab --load .
533+
```shell
534+
$ docker buildx build --build-arg JAVA_VERSION=17 --build-arg OPENHAB_VERSION=4.0.3 --platform linux/arm/v7 --tag openhab/openhab --load .
538535
```
539536

540537
The `build` script in the root of the repository helps to simplify building the openHAB images with BuildKit.

helper-functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ update_dockerhub_readme() {
203203

204204
prepare_builder() {
205205
if [ "$BUILDER" == "" ]; then
206-
docker run --privileged --rm tonistiigi/binfmt:qemu-v7.0.0 --install all &> /dev/null
206+
docker run --privileged --rm tonistiigi/binfmt:qemu-v8.0.4 --install all &> /dev/null
207207
(docker buildx inspect builder &> /dev/null && echo -e "\nReusing existing builder") || \
208208
(docker buildx create --name builder --use &> /dev/null && echo -e "\nCreated builder")
209209
BUILDER="builder"

0 commit comments

Comments
 (0)