Publish AMD64, ARM64, ARMv7 images for binary
Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,6 +11,9 @@
|
|||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
|
# Release
|
||||||
|
dist/
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
# Dependency directories (remove the comment below to include it)
|
||||||
# vendor/
|
# vendor/
|
||||||
bin/
|
bin/
|
||||||
|
|||||||
@@ -74,3 +74,64 @@ release:
|
|||||||
extra_files:
|
extra_files:
|
||||||
- glob: ./output/manifests.tar.gz
|
- glob: ./output/manifests.tar.gz
|
||||||
- glob: ./output/install.yaml
|
- glob: ./output/install.yaml
|
||||||
|
dockers:
|
||||||
|
- image_templates:
|
||||||
|
- 'fluxcd/flux-cli:{{ .Tag }}-amd64'
|
||||||
|
- 'ghcr.io/fluxcd/flux-cli:{{ .Tag }}-amd64'
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
use_buildx: true
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
build_flag_templates:
|
||||||
|
- "--pull"
|
||||||
|
- "--build-arg=ARCH=linux/amd64"
|
||||||
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
|
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
|
||||||
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
|
- "--label=org.opencontainers.image.source={{ .GitURL }}"
|
||||||
|
- "--platform=linux/amd64"
|
||||||
|
- image_templates:
|
||||||
|
- 'fluxcd/flux-cli:{{ .Tag }}-arm64'
|
||||||
|
- 'ghcr.io/fluxcd/flux-cli:{{ .Tag }}-arm64'
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
use_buildx: true
|
||||||
|
goos: linux
|
||||||
|
goarch: arm64
|
||||||
|
build_flag_templates:
|
||||||
|
- "--pull"
|
||||||
|
- "--build-arg=ARCH=linux/arm64"
|
||||||
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
|
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
|
||||||
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
|
- "--label=org.opencontainers.image.source={{ .GitURL }}"
|
||||||
|
- "--platform=linux/arm64"
|
||||||
|
- image_templates:
|
||||||
|
- 'fluxcd/flux-cli:{{ .Tag }}-arm'
|
||||||
|
- 'ghcr.io/fluxcd/flux-cli:{{ .Tag }}-arm'
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
use_buildx: true
|
||||||
|
goos: linux
|
||||||
|
goarch: arm
|
||||||
|
goarm: 7
|
||||||
|
build_flag_templates:
|
||||||
|
- "--pull"
|
||||||
|
- "--build-arg=ARCH=linux/arm"
|
||||||
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
|
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
|
||||||
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
|
- "--label=org.opencontainers.image.source={{ .GitURL }}"
|
||||||
|
- "--platform=linux/arm/v7"
|
||||||
|
docker_manifests:
|
||||||
|
- name_template: 'fluxcd/flux-cli:{{ .Tag }}'
|
||||||
|
image_templates:
|
||||||
|
- 'fluxcd/flux-cli:{{ .Tag }}-amd64'
|
||||||
|
- 'fluxcd/flux-cli:{{ .Tag }}-arm64'
|
||||||
|
- 'fluxcd/flux-cli:{{ .Tag }}-arm'
|
||||||
|
- name_template: 'ghcr.io/fluxcd/flux-cli:{{ .Tag }}'
|
||||||
|
image_templates:
|
||||||
|
- 'ghcr.io/fluxcd/flux-cli:{{ .Tag }}-amd64'
|
||||||
|
- 'ghcr.io/fluxcd/flux-cli:{{ .Tag }}-arm64'
|
||||||
|
- 'ghcr.io/fluxcd/flux-cli:{{ .Tag }}-arm'
|
||||||
|
|||||||
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
FROM alpine:3.13 as builder
|
||||||
|
|
||||||
|
RUN apk add --no-cache ca-certificates curl
|
||||||
|
|
||||||
|
ARG ARCH=linux/amd64
|
||||||
|
ARG KUBECTL_VER=1.20.4
|
||||||
|
|
||||||
|
RUN curl -sL https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VER}/bin/${ARCH}/kubectl \
|
||||||
|
-o /usr/local/bin/kubectl && chmod +x /usr/local/bin/kubectl && \
|
||||||
|
kubectl version --client=true
|
||||||
|
|
||||||
|
FROM alpine:3.13 as flux-cli
|
||||||
|
|
||||||
|
# Create minimal nsswitch.conf file to prioritize the usage of /etc/hosts over DNS queries.
|
||||||
|
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-354316460
|
||||||
|
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||||
|
|
||||||
|
RUN apk add --no-cache ca-certificates
|
||||||
|
|
||||||
|
COPY --from=builder /usr/local/bin/kubectl /usr/local/bin/
|
||||||
|
COPY --chmod=755 flux /usr/local/bin/
|
||||||
|
|
||||||
|
ENTRYPOINT [ "flux" ]
|
||||||
Reference in New Issue
Block a user