Update alpine version for security updates 73/139073/2
authoradheli.tavares <adheli.tavares@est.tech>
Tue, 1 Oct 2024 14:34:48 +0000 (15:34 +0100)
committerAdheli Tavares <adheli.tavares@est.tech>
Wed, 2 Oct 2024 13:51:49 +0000 (13:51 +0000)
Issue-ID: POLICY-5021
Change-Id: I02943545508de777f34c4db7a348ef5aad97e613
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
policy-jdk/alpine/src/main/docker/Dockerfile
policy-jre/alpine/src/main/docker/Dockerfile

index b0a73a9..e868c5b 100644 (file)
@@ -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-2023 Nordix Foundation.
+#    Modifications Copyright (C) 2020, 2022-2024 Nordix Foundation.
 #   ================================================================================
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 #   SPDX-License-Identifier: Apache-2.0
 #   ============LICENSE_END=========================================================
 
-FROM alpine:3.18.2
+FROM alpine:3.20.3
 
 LABEL maintainer="Policy Team"
 LABEL org.opencontainers.image.title="Policy JRE Alpine"
@@ -75,16 +75,15 @@ RUN apk update && \
     adduser -S  --shell /bin/sh -G policy policy && \
     mkdir -p ${POLICY_HOME}/ && \
     chown policy:policy ${POLICY_HOME} && \
-    mkdir -p /usr/lib/jvm/ && \
-    ln -s /opt/java/openjdk /usr/lib/jvm/default-jvm && \
-    python3 -m ensurepip && \
-    pip3 install --no-cache --upgrade pip setuptools
+    mkdir -p /usr/lib/jvm/ && ln -s /opt/java/openjdk /usr/lib/jvm/default-jvm
 
 # Install python/pip
-RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
-RUN python3 -m ensurepip
-RUN pip3 install --no-cache --upgrade pip setuptools
-
+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
index d8af19f..c5c0273 100644 (file)
@@ -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-2023 Nordix Foundation.
+#    Modifications Copyright (C) 2020, 2022-2024 Nordix Foundation.
 #   ================================================================================
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 #   SPDX-License-Identifier: Apache-2.0
 #   ============LICENSE_END=========================================================
 
-FROM alpine:3.18.2
+FROM alpine:3.20.3
 
 LABEL maintainer="Policy Team"
 LABEL org.opencontainers.image.title="Policy JRE Alpine"