aboutsummaryrefslogtreecommitdiffstats
path: root/policy-jdk
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-10-01 15:34:48 +0100
committerAdheli Tavares <adheli.tavares@est.tech>2024-10-02 13:51:49 +0000
commite502acbd82829b11624bd10e38c01a5e57d88492 (patch)
tree8eb9209e66623ad16c41a770a50c3dd47f095571 /policy-jdk
parent36dcba5249bd13892941d73cc1ac1b561e6d2424 (diff)
Update alpine version for security updates
Issue-ID: POLICY-5021 Change-Id: I02943545508de777f34c4db7a348ef5aad97e613 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'policy-jdk')
-rw-r--r--policy-jdk/alpine/src/main/docker/Dockerfile19
1 files changed, 9 insertions, 10 deletions
diff --git a/policy-jdk/alpine/src/main/docker/Dockerfile b/policy-jdk/alpine/src/main/docker/Dockerfile
index b0a73a9e..e868c5b3 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-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