Skip to content

Commit ffbe4a9

Browse files
Sachin-Yeshwanthandrewschoen
authored andcommitted
Dockerfile: testing multi-arch builds
1 parent 4d61d9b commit ffbe4a9

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.tekton/snmp-notifier-8-1-pull-request.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ spec:
3030
- name: build-platforms
3131
value:
3232
- linux/x86_64
33+
- linux/arm64
34+
- linux/s390x
35+
- linux/ppc64le
3336
- name: dockerfile
3437
value: Dockerfile
3538
- name: path-context

.tekton/snmp-notifier-8-1-push.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ spec:
2727
- name: build-platforms
2828
value:
2929
- linux/x86_64
30+
- linux/arm64
31+
- linux/s390x
32+
- linux/ppc64le
3033
- name: dockerfile
3134
value: Dockerfile
3235
- name: path-context

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build stage 1
22

33
#FROM openshift/golang-builder:rhel_9_golang_1.23 AS builder
4-
FROM quay.io/projectquay/golang:1.23 AS builder
4+
FROM --platform=$BUILDPLATFORM quay.io/projectquay/golang:1.23 AS builder
55

66
COPY snmp_notifier snmp_notifier
77

@@ -22,7 +22,7 @@ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -mod=readonly \
2222
-a -tags netgo
2323

2424
# Build stage 2
25-
FROM registry.redhat.io/ubi9/ubi-minimal
25+
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9-minimal:latest
2626

2727
# Update the image to get the latest CVE updates
2828
RUN microdnf update -y && \
@@ -46,5 +46,4 @@ RUN chmod +x "$OPBIN"
4646

4747
EXPOSE 9464
4848
ENTRYPOINT ["/usr/local/bin/snmp_notifier"]
49-
CMD ["--snmp.trap-description-template=/etc/snmp_notifier/description-template.tpl"]
50-
49+
CMD ["--snmp.trap-description-template=/etc/snmp_notifier/description-template.tpl"]

0 commit comments

Comments
 (0)