Skip to content

Commit a9b1c94

Browse files
committed
Create Dockerfile.konflux
1 parent 8ca1e13 commit a9b1c94

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

Dockerfile.konflux

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
# Copyright 2021 IBM Corporation
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
15-
ARG GOLANG_VERSION=1.21
1+
162
ARG BUILD_BASE=develop
173

4+
#go-1.21
185
FROM --platform=$BUILDPLATFORM registry.redhat.io/ubi8/go-toolset@sha256:4ec05fd5b355106cc0d990021a05b71bbfb9231e4f5bdc0c5316515edf6a1c96 AS build
196

207
FROM --platform=$BUILDPLATFORM $BUILD_BASE AS build
@@ -32,11 +19,8 @@ RUN go mod download
3219
# Copy the source
3320
COPY . ./
3421

35-
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
36-
# don't provide "default" values (e.g. 'ARG TARGETARCH=amd64') for non-buildx environments,
37-
# see https://github.com/docker/buildx/issues/510
38-
ARG TARGETOS
39-
ARG TARGETARCH
22+
ARG TARGETOS=amd64
23+
ARG TARGETARCH=linux
4024

4125
# Build the binaries using native go compiler from BUILDPLATFORM but compiled output for TARGETPLATFORM
4226
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
@@ -54,7 +38,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
5438
###############################################################################
5539
# Stage 3: Copy build assets to create the smallest final runtime image
5640
###############################################################################
57-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as runtime
41+
#ubi-minimal:latest
42+
FROM registry.redhat.io/ubi8/ubi-minimal@sha256:7583ca0ea52001562bd81a961da3f75222209e6192e4e413ee226cff97dbd48c as runtime
5843

5944
ARG USER=2000
6045

@@ -105,7 +90,6 @@ LABEL com.redhat.component="odh-modelmesh-runtime-adapter-container" \
10590
io.k8s.display-name="odh-model-serving-runtime-adapter" \
10691
io.k8s.description="odh-model-serving-runtime-adapter" \
10792
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
108-
109-
93+
11094
# Don't define an entrypoint. This is a multi-purpose image so the user should specify which binary they want to run (e.g. /opt/app/puller or /opt/app/triton-adapter)
111-
ENTRYPOINT ["/opt/app/puller"]
95+
# ENTRYPOINT ["/opt/app/puller"]

0 commit comments

Comments
 (0)