Skip to content

Commit

Permalink
feat(docker): Use buildx to generate multiplatform builds
Browse files Browse the repository at this point in the history
Signed-off-by: Rodney Osodo <[email protected]>
  • Loading branch information
rodneyosodo committed May 11, 2024
1 parent 75db28c commit c9e7a16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
build-and-push:
name: Build and Push
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

MG_DOCKER_IMAGE_NAME_PREFIX ?= magistrala
MG_DOCKER_IMAGE_NAME_PREFIX ?= rodneydav
BUILD_DIR = build
SERVICES = auth users things http coap ws lora influxdb-writer influxdb-reader mongodb-writer \
mongodb-reader cassandra-writer cassandra-reader postgres-writer postgres-reader timescale-writer timescale-reader cli \
Expand Down Expand Up @@ -48,7 +48,8 @@ endef
define make_docker
$(eval svc=$(subst docker_,,$(1)))

docker build \
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--no-cache \
--build-arg SVC=$(svc) \
--build-arg GOARCH=$(GOARCH) \
Expand Down

0 comments on commit c9e7a16

Please sign in to comment.