forked from openshift-pipelines/pipelines-as-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
22 lines (17 loc) · 767 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:a2bdd33c7fc0cda56eb3745e80820c1ee29efeaac720f7c52a59224a39003261 AS builder
ARG BINARY_NAME=pipelines-as-code-controller
COPY . /src
WORKDIR /src
RUN \
git config --global --add safe.directory /src && \
make /tmp/${BINARY_NAME} LDFLAGS="-s -w" OUTPUT_DIR=/tmp
FROM registry.access.redhat.com/ubi9/ubi-minimal
ARG BINARY_NAME=pipelines-as-code-controller
LABEL com.redhat.component=${BINARY_NAME} \
name=openshift-pipelines/${BINARY_NAME} \
maintainer=pipelines@redhat.com \
summary="This image is to run Pipelines as Code ${BINARY_NAME} component"
COPY --from=builder /tmp/${BINARY_NAME} /usr/bin/${BINARY_NAME}
USER 1001
ENV RUN_BINARY_NAME=$BINARY_NAME
CMD /usr/bin/${RUN_BINARY_NAME}