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
+
16
2
ARG BUILD_BASE=develop
17
3
4
+ #go-1.21
18
5
FROM --platform=$BUILDPLATFORM registry.redhat.io/ubi8/go-toolset@sha256:4ec05fd5b355106cc0d990021a05b71bbfb9231e4f5bdc0c5316515edf6a1c96 AS build
19
6
20
7
FROM --platform=$BUILDPLATFORM $BUILD_BASE AS build
@@ -32,11 +19,8 @@ RUN go mod download
32
19
# Copy the source
33
20
COPY . ./
34
21
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
40
24
41
25
# Build the binaries using native go compiler from BUILDPLATFORM but compiled output for TARGETPLATFORM
42
26
# 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 \
54
38
###############################################################################
55
39
# Stage 3: Copy build assets to create the smallest final runtime image
56
40
###############################################################################
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
58
43
59
44
ARG USER=2000
60
45
@@ -105,7 +90,6 @@ LABEL com.redhat.component="odh-modelmesh-runtime-adapter-container" \
105
90
io.k8s.display-name="odh-model-serving-runtime-adapter" \
106
91
io.k8s.description="odh-model-serving-runtime-adapter" \
107
92
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
108
-
109
-
93
+
110
94
# 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