diff --git a/.goreleaser.yaml b/.goreleaser.yaml index da71a6e..3c1cc41 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -26,7 +26,8 @@ dockers: - image_templates: - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64" use: buildx - dockerfile: Dockerfile + dockerfile: Dockerfile.x86_64 + goarch: amd64 build_flag_templates: - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" diff --git a/Dockerfile b/Dockerfile index 3391bf8..d515b81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ -FROM gcr.io/distroless/static-debian11 +FROM alpine COPY assets/ /assets -USER nonroot:nonroot - ENTRYPOINT ["/usr/bin/port-k8s-exporter"] COPY port-k8s-exporter /usr/bin/port-k8s-exporter diff --git a/Dockerfile.x86_64 b/Dockerfile.x86_64 new file mode 100644 index 0000000..4ffc6f4 --- /dev/null +++ b/Dockerfile.x86_64 @@ -0,0 +1,9 @@ +FROM alpine + +COPY assets/ /assets + +RUN apk add gcompat + +ENTRYPOINT ["/usr/bin/port-k8s-exporter"] + +COPY port-k8s-exporter /usr/bin/port-k8s-exporter diff --git a/pkg/event_handler/consumer/consumer_test.go b/pkg/event_handler/consumer/consumer_test.go index 2ac8658..64a392c 100644 --- a/pkg/event_handler/consumer/consumer_test.go +++ b/pkg/event_handler/consumer/consumer_test.go @@ -95,7 +95,7 @@ func TestConsumer_HandleJson(t *testing.T) { f.Consume(mockHandler.HandleJson) f.Produce(t, []byte("test-value")) - time.Sleep(time.Second) + time.Sleep(time.Second * 2) if len(mockHandler.CapturedValue) == 0 { t.Error("Handler was not called")