Skip to content

Commit

Permalink
chore: add arch data to the image
Browse files Browse the repository at this point in the history
  • Loading branch information
Demonsthere committed Oct 25, 2024
1 parent e0c2010 commit bcbf4e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ dockers:
goarch: amd64
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_ARCH=amd64"
dockerfile: "docker/Dockerfile"
use: "buildx"
- image_templates:
- "oryd/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "oryd/{{ .ProjectName }}:{{ .ShortCommit }}-arm64"
goarch: arm64
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=BUILD_ARCH=arm64"
dockerfile: "docker/Dockerfile"
use: "buildx"

docker_manifests:
- name_template: "oryd/{{ .ProjectName }}:{{ .Tag }}"
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
FROM alpine:3.20

ARG USER=ory
ARG BUILD_ARCH=amd64
ENV HOME=/home/$USER
ENV JQ_VERSION=1.7.1
ENV KUBECTL_VERSION=1.31.2

RUN apk add --no-cache --update-cache --upgrade --latest \
ca-certificates curl netcat-openbsd coreutils bash inotify-tools procps

RUN curl -Lo /usr/local/bin/jq "https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64" &&\
RUN curl -Lo /usr/local/bin/jq "https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux-${BUILD_ARCH}" &&\
chmod +x /usr/local/bin/jq &&\
jq --version

RUN addgroup -S $USER &&\
adduser -S $USER -G $USER -D -H -s /bin/bash

RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" &&\
RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${BUILD_ARCH}/kubectl" &&\
chmod +x kubectl &&\
mv kubectl /usr/local/bin/kubectl

Expand Down

0 comments on commit bcbf4e1

Please sign in to comment.