File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ RUN GO111MODULE=on CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go build -tags s
36
36
37
37
# 2. Compile preloaded pipeline samples
38
38
FROM registry.access.redhat.com/ubi9/python-39:9.5 AS compiler
39
+
40
+ ARG TARGETOS TARGETARCH
41
+
39
42
USER root
40
43
RUN dnf install -y python3-setuptools jq
41
44
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py
@@ -44,10 +47,10 @@ RUN python3 -m pip install -r requirements.txt --no-cache-dir
44
47
45
48
# Downloading Argo CLI so that the samples are validated
46
49
ENV ARGO_VERSION=v3.5.14
47
- RUN curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux- amd64.gz && \
48
- gunzip argo-linux- amd64.gz && \
49
- chmod +x argo-linux- amd64 && \
50
- mv ./argo-linux- amd64 /usr/local/bin/argo
50
+ RUN curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-${TARGETOS:- linux}-${TARGETARCH:- amd64} .gz && \
51
+ gunzip argo-${TARGETOS:- linux}-${TARGETARCH:- amd64} .gz && \
52
+ chmod +x argo-${TARGETOS:- linux}-${TARGETARCH:- amd64} && \
53
+ mv ./argo-${TARGETOS:- linux}-${TARGETARCH:- amd64} /usr/local/bin/argo
51
54
52
55
WORKDIR /
53
56
COPY ./samples /samples
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ FROM registry.access.redhat.com/ubi9/go-toolset:1.23 AS builder
20
20
21
21
## Build args to be used at this step
22
22
ARG SOURCE_CODE
23
+ ARG TARGETARCH
23
24
24
25
## Switch to root as required for some operations
25
26
USER root
@@ -34,7 +35,7 @@ RUN GO111MODULE=on go mod download
34
35
# Copy the source
35
36
COPY ${SOURCE_CODE}/ ./
36
37
37
- RUN GO111MODULE=on CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GOEXPERIMENT=strictfipsruntime go build -tags 'netgo strictfipsruntime' -o /bin/driver ./backend/src/v2/cmd/driver/*.go
38
+ RUN GO111MODULE=on CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH:- amd64} GOEXPERIMENT=strictfipsruntime go build -tags 'netgo strictfipsruntime' -o /bin/driver ./backend/src/v2/cmd/driver/*.go
38
39
39
40
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5
40
41
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ FROM registry.access.redhat.com/ubi9/go-toolset:1.23 AS builder
22
22
23
23
## Build args to be used at this step
24
24
ARG SOURCE_CODE
25
+ ARG TARGETARCH
25
26
26
27
## Switch to root as required for some operations
27
28
USER root
@@ -36,8 +37,8 @@ RUN GO111MODULE=on go mod download
36
37
# Copy the source
37
38
COPY ${SOURCE_CODE}/ ./
38
39
39
- RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/launcher-v2 ./backend/src/v2/cmd/launcher-v2/*.go
40
- RUN GO111MODULE=on CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GOEXPERIMENT=strictfipsruntime go build -tags 'netgo strictfipsruntime' -o /bin/launcher-v2-fips ./backend/src/v2/cmd/launcher-v2/*.go
40
+ RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH:- amd64} go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/launcher-v2 ./backend/src/v2/cmd/launcher-v2/*.go
41
+ RUN GO111MODULE=on CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH:- amd64} GOEXPERIMENT=strictfipsruntime go build -tags 'netgo strictfipsruntime' -o /bin/launcher-v2-fips ./backend/src/v2/cmd/launcher-v2/*.go
41
42
42
43
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5
43
44
You can’t perform that action at this time.
0 commit comments