Skip to content

Commit

Permalink
add initial arm support
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
  • Loading branch information
kvaps committed Jun 20, 2024
1 parent 02a41e1 commit f12e2c3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/core/installer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ image-cozystack:
--provenance false \
--tag $(REGISTRY)/cozystack:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/cozystack:latest \
--platform linux/amd64,linux/arm64 \
--cache-to type=inline \
--metadata-file images/cozystack.json \
--push=$(PUSH) \
Expand Down
10 changes: 8 additions & 2 deletions packages/core/installer/images/cozystack.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"containerimage.config.digest": "sha256:6d54a5b971e80fbaace664054d4e67f24fd1fbb7807ebaffd036d4ea7195df10",
"containerimage.digest": "sha256:a6b167235d8556ff7e45f4582c2491a2ad48292a46005dcf767908e2fb78e74e"
"buildx.build.ref": "youthful_hertz/youthful_hertz0/aafwjh8j28i98f59smgh3qe86",
"containerimage.descriptor": {
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"digest": "sha256:e0c0defb9f5b10f5187d4002ccec7d01841e96c7350963f253003c0efeff6cef",
"size": 685
},
"containerimage.digest": "sha256:e0c0defb9f5b10f5187d4002ccec7d01841e96c7350963f253003c0efeff6cef",
"image.name": "ghcr.io/aenix-io/cozystack/cozystack:latest"
}
2 changes: 1 addition & 1 deletion packages/core/installer/images/cozystack.tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ghcr.io/aenix-io/cozystack/cozystack:v0.7.0
ghcr.io/aenix-io/cozystack/cozystack:latest
5 changes: 4 additions & 1 deletion packages/core/installer/images/cozystack/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ FROM golang:alpine3.19 as k8s-await-election-builder
ARG K8S_AWAIT_ELECTION_GITREPO=https://github.com/LINBIT/k8s-await-election
ARG K8S_AWAIT_ELECTION_VERSION=0.4.1

# TARGETARCH is a docker special variable: https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETARCH

RUN apk add --no-cache git make
RUN git clone ${K8S_AWAIT_ELECTION_GITREPO} /usr/local/go/k8s-await-election/ \
&& cd /usr/local/go/k8s-await-election \
&& git reset --hard v${K8S_AWAIT_ELECTION_VERSION} \
&& make \
&& mv ./out/k8s-await-election-amd64 /k8s-await-election
&& mv ./out/k8s-await-election-${TARGETARCH} /k8s-await-election

FROM alpine:3.19 AS builder

Expand Down

0 comments on commit f12e2c3

Please sign in to comment.