forked from opendatahub-io/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathDockerfile.konflux
More file actions
55 lines (39 loc) · 2.34 KB
/
Copy pathDockerfile.konflux
File metadata and controls
55 lines (39 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
ARG SOURCE_CODE=.
# Builder args
ARG GIT_COMMIT=unknown
ARG GIT_TAG=unknown
ARG GIT_TREE_STATE=unknown
FROM registry.access.redhat.com/ubi9/go-toolset:1.24@sha256:6234f572204d672a0ee0686d748fbb9b7b05679368bf0d7a4446e13970e58060 as builder
# Build args to be used at this step
ARG SOURCE_CODE
WORKDIR /workspace
USER root
RUN dnf install -y mailcap
COPY ${SOURCE_CODE}/go.mod .
COPY ${SOURCE_CODE}/go.sum .
COPY ${SOURCE_CODE}/ ./
# Set the /workspace directory as safe for Git
RUN git config --global --add safe.directory /workspace
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build GIT_COMMIT=${GIT_COMMIT} GIT_TAG=${GIT_TAG} GIT_TREE_STATE=${GIT_TREE_STATE} CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go build -tags strictfipsruntime -v -o dist/argoexec-fips ./cmd/argoexec
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build GIT_COMMIT=${GIT_COMMIT} GIT_TAG=${GIT_TAG} GIT_TREE_STATE=${GIT_TREE_STATE} CGO_ENABLED=0 go build -ldflags '-extldflags -static' -v -o dist/argoexec ./cmd/argoexec
####################################################################################################
FROM registry.redhat.io/ubi9/ubi-minimal@sha256:2a98ec380ad75004992b8538380a5003da64442f0a69237ed236859e023c71d0 AS workflow-controller
ARG CI_CONTAINER_VERSION
LABEL com.redhat.component="odh-data-science-pipelines-argo-argoexec-container" \
name="managed-open-data-hub/odh-data-science-pipelines-argo-argoexec-rhel8" \
description="Argo Executor for Argo Workflows used in Data Science Pipelines" \
summary="odh-data-science-pipelines-argo-argoexec" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-data-science-pipelines-argo-argoexec" \
io.k8s.description="odh-data-science-pipelines-argo-argoexec" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
WORKDIR /bin
COPY --from=builder /workspace/dist/argoexec /bin/
COPY --from=builder /workspace/dist/argoexec-fips /bin/
COPY --from=builder /etc/mime.types /etc/mime.types
COPY --from=builder /workspace/hack/ssh_known_hosts /etc/ssh/
COPY --from=builder /workspace/hack/nsswitch.conf /etc/
RUN chmod +x /bin/argoexec && chmod +x /bin/argoexec-fips
USER 2000
ENTRYPOINT [ "/bin/argoexec" ]