From 5608681ab740192833e04538ec8997cb9bfe74ae Mon Sep 17 00:00:00 2001 From: yair Date: Tue, 2 Jan 2024 22:57:24 +0200 Subject: [PATCH] x86_64 file --- .goreleaser.yaml | 30 +++++++++++++++--------------- Dockerfile_x86_64 | 3 +-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0718b50..3ad7307 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -23,24 +23,24 @@ builds: goarch: - arm64 dockers: -#- image_templates: -# - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64" -# use: buildx -# dockerfile: Dockerfile -# goarch: amd64 -# build_flag_templates: -# - "--label=org.opencontainers.image.created={{.Date}}" -# - "--label=org.opencontainers.image.title={{.ProjectName}}" -# - "--label=org.opencontainers.image.revision={{.FullCommit}}" -# - "--label=org.opencontainers.image.version={{.Version}}" -# - "--platform=linux/amd64" -# extra_files: -# - assets/ +- image_templates: + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64" + use: buildx + dockerfile: Dockerfile_x86_64 + goarch: amd64 + build_flag_templates: + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.title={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--platform=linux/amd64" + extra_files: + - assets/ - image_templates: - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64v8" use: buildx goarch: arm64 - dockerfile: Dockerfile_x86_64 + dockerfile: Dockerfile build_flag_templates: - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -52,7 +52,7 @@ dockers: docker_manifests: - name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}" image_templates: -# - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64" + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64v8" #- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest" # image_templates: diff --git a/Dockerfile_x86_64 b/Dockerfile_x86_64 index 117c347..74e15bf 100644 --- a/Dockerfile_x86_64 +++ b/Dockerfile_x86_64 @@ -3,8 +3,7 @@ FROM alpine COPY assets/ /assets #USER nonroot:nonroot -RUN echo "aaa" -RUN if apk --print-arch | grep -q x86_64; then apk add gcompat; fi +RUN apk add gcompat ENTRYPOINT ["/usr/bin/port-k8s-exporter"]