Skip to content

Commit 78cbe1b

Browse files
authored
Using ubi8/ubi-minimal base-image instead of ubi8/python39 (#382)
The minimal base image has a smaller attack surface, creates no warning in Vulnerability Advisor and the resulting images are much smaller
1 parent 9c5c66e commit 78cbe1b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Dockerfile.ubi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
# SPDX-License-Identifier: Apache2.0
44
#
55

6-
FROM registry.access.redhat.com/ubi8/python-39@sha256:82f2d23d9f93332c47bc4be0a05e9d0bbc07deed48e72bc14639fbfee8c5f237
6+
FROM registry.access.redhat.com/ubi8/ubi-minimal@sha256:6910799b75ad41f00891978575a0d955be2f800c51b955af73926e7ab59a41c3
77

88
USER 0
99

10-
RUN yum -y upgrade
10+
RUN INSTALL_PKGS="python39 python39-devel python39-pip openssl tar gzip" && \
11+
microdnf --nodocs -y upgrade && \
12+
microdnf -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
13+
rpm -V $INSTALL_PKGS && \
14+
microdnf -y clean all --enablerepo='*'
1115

1216
COPY requirements.txt /nca/
1317
RUN python -m pip install -U pip wheel setuptools && pip install -r /nca/requirements.txt

0 commit comments

Comments
 (0)