From ed38a50541249063daf2cfb00b312fb173adeace Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Mon, 16 Jun 2025 15:46:20 +0100 Subject: [PATCH] Remove python from the java app docker images Issue-ID: POLICY-5384 Change-Id: I0e5e3dfb700686a3d532160faa1671dc9d77db16 Signed-off-by: adheli.tavares --- policy-jdk/alpine/src/main/docker/Dockerfile | 18 +++--------------- policy-jre/alpine/src/main/docker/Dockerfile | 7 ++----- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/policy-jdk/alpine/src/main/docker/Dockerfile b/policy-jdk/alpine/src/main/docker/Dockerfile index e868c5b3..38bfc4a9 100644 --- a/policy-jdk/alpine/src/main/docker/Dockerfile +++ b/policy-jdk/alpine/src/main/docker/Dockerfile @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # Copyright (C) 2019 Tieto. All rights reserved. # Modifications Copyright (C) 2020, 2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2020, 2022-2024 Nordix Foundation. +# Modifications Copyright (C) 2020, 2022-2025 OpenInfra Foundation Europe. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,8 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apk update && \ apk add --no-cache \ libretls \ - musl-locales \ - musl-locales-lang \ openjdk17-jdk \ - openssl \ - ca-certificates && \ + openssl && \ rm -rf /var/cache/apk/* && \ # ONAP additions addgroup -S $group && \ @@ -68,8 +65,7 @@ RUN apk update && \ jq \ procps \ unzip \ - zip \ - python3 && \ + zip && \ rm -rf /var/cache/apk/* && \ addgroup -S policy && \ adduser -S --shell /bin/sh -G policy policy && \ @@ -77,14 +73,6 @@ RUN apk update && \ chown policy:policy ${POLICY_HOME} && \ mkdir -p /usr/lib/jvm/ && ln -s /opt/java/openjdk /usr/lib/jvm/default-jvm -# Install python/pip -RUN apk add --no-cache python3 && \ - rm /usr/lib/python3.*/EXTERNALLY-MANAGED && \ - if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \ - python -m ensurepip && \ - if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ - pip install --no-cache --upgrade pip setuptools - # Tell docker that all future commands should be run as the onap user USER $user WORKDIR /app diff --git a/policy-jre/alpine/src/main/docker/Dockerfile b/policy-jre/alpine/src/main/docker/Dockerfile index c5c0273d..b044e99a 100644 --- a/policy-jre/alpine/src/main/docker/Dockerfile +++ b/policy-jre/alpine/src/main/docker/Dockerfile @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # Copyright (C) 2019 Tieto. All rights reserved. # Modifications Copyright (C) 2020, 2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2020, 2022-2024 Nordix Foundation. +# Modifications Copyright (C) 2020, 2022-2025 OpenInfra Foundation Europe. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,11 +46,8 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apk update && \ apk add --no-cache \ libretls \ - musl-locales \ - musl-locales-lang \ openjdk17-jre \ - openssl \ - ca-certificates && \ + openssl && \ rm -rf /var/cache/apk/* && \ # ONAP additions addgroup -S $group && \ -- 2.16.6