Skip to content

Commit 03addd4

Browse files
authored
Merge pull request #11 from gguridi/develop
Multiarch (#10)
2 parents 3ca8cc1 + 0518010 commit 03addd4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
kafka_version: [2.8.2, 3.0.2, 3.1.2, 3.2.3, 3.3.1]
4343
steps:
4444
- uses: actions/checkout@v3
45+
- name: Set up QEMU
46+
uses: docker/setup-qemu-action@v1
47+
- name: Set up Docker Buildx
48+
id: buildx
49+
uses: docker/setup-buildx-action@v1
4550
- uses: actions/setup-node@v3
4651
with:
4752
node-version: 16

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"start": "mockserver -p 80 -q -m /opt/api",
77
"build": "docker build -t $KAFKA_IMAGE --build-arg SCALA_VERSION=$SCALA_VERSION --build-arg KAFKA_VERSION=$KAFKA_VERSION .",
8-
"publish": "yarn run build && docker push $KAFKA_IMAGE",
8+
"build-multiarch": "docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t $KAFKA_IMAGE --build-arg SCALA_VERSION=$SCALA_VERSION --build-arg KAFKA_VERSION=$KAFKA_VERSION .",
9+
"publish": "yarn run build-multiarch && docker push $KAFKA_IMAGE",
910
"docker-run": "docker run --name kafka-local -d -p 2181:2181 -p 9092:9092 -e KAFKA__ADVERTISED_HOST_NAME=localhost -e KAFKA__ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 $KAFKA_IMAGE",
1011
"docker-stop": "docker rm -f kafka-local || true",
1112
"test": "node ./node_modules/jest/bin/jest.js --forceExit --detectOpenHandles"

0 commit comments

Comments
 (0)