Skip to content

Commit

Permalink
ARM Support: build multi arch images (#61)
Browse files Browse the repository at this point in the history
This PR is the first part of making Odigos support ARM processrors.
I am currently testing it on Apple Silicon. 
This PR changes the github workflow to build multi architecture images.
  • Loading branch information
edeNFed authored Jan 30, 2023
1 parent 9e7e103 commit 9b6eb58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
go-version: '>=1.19.2'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -34,46 +36,53 @@ jobs:
push: true
tags: ghcr.io/keyval-dev/odigos/autoscaler:${{ steps.vars.outputs.tag }}
build-args: SERVICE_NAME=autoscaler
platforms: linux/amd64,linux/arm64
- name: Build Scheduler Image
uses: docker/build-push-action@v3
with:
push: true
tags: ghcr.io/keyval-dev/odigos/scheduler:${{ steps.vars.outputs.tag }}
build-args: SERVICE_NAME=scheduler
platforms: linux/amd64,linux/arm64
- name: Build Instrumentor Image
uses: docker/build-push-action@v3
with:
push: true
tags: ghcr.io/keyval-dev/odigos/instrumentor:${{ steps.vars.outputs.tag }}
build-args: SERVICE_NAME=instrumentor
platforms: linux/amd64,linux/arm64
- name: Build Detector Image
uses: docker/build-push-action@v3
with:
file: langDetector/Dockerfile
push: true
tags: ghcr.io/keyval-dev/odigos/lang-detector:${{ steps.vars.outputs.tag }}
build-args: SERVICE_NAME=langDetector
platforms: linux/amd64,linux/arm64
- name: Build Odiglet Image
uses: docker/build-push-action@v3
with:
file: odiglet/Dockerfile
context: odiglet/
push: true
tags: ghcr.io/keyval-dev/odigos/odiglet:${{ steps.vars.outputs.tag }}
platforms: linux/amd64,linux/arm64
- name: Build Init Image
uses: docker/build-push-action@v3
with:
file: init/Dockerfile
context: init/
push: true
tags: ghcr.io/keyval-dev/odigos/init:${{ steps.vars.outputs.tag }}
platforms: linux/amd64,linux/arm64
- name: Build UI Image
uses: docker/build-push-action@v3
with:
file: ui/Dockerfile
context: ui/
push: true
tags: ghcr.io/keyval-dev/odigos/ui:${{ steps.vars.outputs.tag }}
platforms: linux/amd64,linux/arm64
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /workspace
COPY . .
# Build
WORKDIR /workspace/$SERVICE_NAME
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o ../app main.go
RUN CGO_ENABLED=0 go build -a -o ../app main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
2 changes: 1 addition & 1 deletion langDetector/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /workspace
COPY . .
# Build
WORKDIR /workspace/$SERVICE_NAME
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o ../app main.go
RUN CGO_ENABLED=0 go build -a -o ../app main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down

0 comments on commit 9b6eb58

Please sign in to comment.