|
15 | 15 | ###############################################################################
|
16 | 16 | # Stage 1: Create the developer image for the BUILDPLATFORM only
|
17 | 17 | ###############################################################################
|
18 |
| -ARG GOLANG_VERSION=1.21 |
19 |
| -FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi8/go-toolset:$GOLANG_VERSION AS develop |
| 18 | +ARG GOLANG_VERSION=1.22 |
| 19 | +FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:$GOLANG_VERSION AS develop |
20 | 20 |
|
21 | 21 | ARG PROTOC_VERSION=21.12
|
22 | 22 |
|
23 | 23 | USER root
|
24 | 24 | ENV HOME=/root
|
25 | 25 |
|
26 | 26 | # Install build and dev tools
|
27 |
| -# NOTE: Require python38 to install pre-commit |
| 27 | +# python is required for pre-commit |
28 | 28 | RUN --mount=type=cache,target=/root/.cache/dnf:rw \
|
29 | 29 | dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
|
30 | 30 | nodejs \
|
31 |
| - python38 \ |
32 |
| - && ln -sf /usr/bin/python3 /usr/bin/python \ |
33 |
| - && ln -sf /usr/bin/pip3 /usr/bin/pip \ |
| 31 | + python3.11 \ |
| 32 | + python3.11-pip \ |
| 33 | + && alternatives --install /usr/bin/python python /usr/bin/python3.11 1 \ |
| 34 | + && alternatives --install /usr/bin/pip pip /usr/bin/pip3.11 1 \ |
34 | 35 | && true
|
35 | 36 |
|
36 | 37 | # Install pre-commit
|
37 | 38 | ENV PIP_CACHE_DIR=/root/.cache/pip
|
38 | 39 | RUN --mount=type=cache,target=/root/.cache/pip \
|
39 |
| - pip install pre-commit |
| 40 | + /usr/bin/pip install pre-commit |
40 | 41 |
|
41 | 42 | # When using the BuildKit backend, Docker predefines a set of ARG variables with
|
42 | 43 | # information on the platform of the node performing the build (build platform)
|
@@ -133,7 +134,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
133 | 134 | ###############################################################################
|
134 | 135 | # Stage 3: Copy binaries only to create the smallest final runtime image
|
135 | 136 | ###############################################################################
|
136 |
| -FROM registry.access.redhat.com/ubi8/ubi-micro:latest as runtime |
| 137 | +FROM registry.access.redhat.com/ubi9/ubi-micro:9.5 as runtime |
137 | 138 |
|
138 | 139 | ARG USER=2000
|
139 | 140 |
|
|
0 commit comments