Skip to content

Commit

Permalink
Merge pull request #119 from red-hat-data-services/konflu-labels
Browse files Browse the repository at this point in the history
update LABELs and remove unwanted ARGs for konflux builds
  • Loading branch information
MohammadiIram authored Oct 16, 2024
2 parents 9a7fb1a + 7211ef0 commit 7fa8201
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
14 changes: 3 additions & 11 deletions components/notebook-controller/Dockerfile.konflux
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Build arguments
ARG SOURCE_CODE=.
ARG CI_CONTAINER_VERSION="unknown"
ARG GOLANG_VERSION=1.21

# Use ubi8/go-toolset as base image
Expand All @@ -11,7 +10,6 @@ ARG TARGETARCH
## Build args to be used at this step
ARG SOURCE_CODE


#WORKDIR /workspace

WORKDIR /opt/rhods
Expand All @@ -35,8 +33,6 @@ RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go
# Use ubi8/ubi-minimal as base image
FROM registry.redhat.io/ubi8/ubi-minimal@sha256:7583ca0ea52001562bd81a961da3f75222209e6192e4e413ee226cff97dbd48c

## Build args to be used at this step
ARG CI_CONTAINER_VERSION

## Install additional packages
RUN microdnf install -y shadow-utils &&\
Expand All @@ -45,27 +41,23 @@ RUN microdnf install -y shadow-utils &&\
## Create a non-root user with UID 1001
RUN useradd --uid 1001 --create-home --user-group --system rhods


## Set workdir directory to user home
WORKDIR /home/rhods

## Copy odh-notebook-controller-manager binary from builder stage
COPY --from=builder /opt/rhods/odh-notebook-controller/bin/manager .


## Switch to a non-root user
USER 1001:0

ENTRYPOINT [ "/manager" ]

LABEL com.redhat.component="odh-notebook-controller-container" \
name="managed-open-data-hub/odh-notebook-controller-rhel8" \
version="${CI_CONTAINER_VERSION}" \
git.url="${CI_KUBEFLOW_UPSTREAM_URL}" \
git.commit="${CI_KUBEFLOW_UPSTREAM_COMMIT}" \
description="odh-notebook-controller" \
summary="odh-notebook-controller" \
maintainer="['[email protected]']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-notebook-controller" \
maintainer="['[email protected]']" \
description="odh-notebook-controller" \
io.k8s.description="odh-notebook-controller" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
11 changes: 3 additions & 8 deletions components/odh-notebook-controller/Dockerfile.konflux
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Build arguments
ARG SOURCE_CODE=.
ARG CI_CONTAINER_VERSION="unknown"

# Use ubi8/go-toolset as base image
FROM registry.access.redhat.com/ubi8/go-toolset@sha256:4ec05fd5b355106cc0d990021a05b71bbfb9231e4f5bdc0c5316515edf6a1c96 as builder
Expand Down Expand Up @@ -36,8 +35,6 @@ RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -tags strictfipsruntime -a
# Use ubi8/ubi-minimal as base image
FROM registry.redhat.io/ubi8/ubi-minimal@sha256:7583ca0ea52001562bd81a961da3f75222209e6192e4e413ee226cff97dbd48c

## Build args to be used at this step
ARG CI_CONTAINER_VERSION

## Install additional packages
RUN microdnf install -y shadow-utils &&\
Expand All @@ -55,12 +52,10 @@ ENTRYPOINT ["/manager"]

LABEL com.redhat.component="odh-kf-notebook-controller-container" \
name="managed-open-data-hub/odh-kf-notebook-controller-rhel8" \
version="${CI_CONTAINER_VERSION}" \
git.url="${CI_KUBEFLOW_UPSTREAM_URL}" \
git.commit="${CI_KUBEFLOW_UPSTREAM_COMMIT}" \
description="odh-kf-notebook-controller" \
summary="odh-kf-notebook-controller" \
maintainer="['[email protected]']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-kf-notebook-controller" \
maintainer="['[email protected]']" \
description="odh-kf-notebook-controller" \
io.k8s.description="odh-kf-notebook-controller" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

0 comments on commit 7fa8201

Please sign in to comment.