From 94176d70ee48b1703981cd8786c306f7c055e15d Mon Sep 17 00:00:00 2001 From: eschcam Date: Thu, 30 Mar 2023 13:47:20 +0100 Subject: [PATCH] Upgrade docker images to use Python 3 Issue-ID: SDC-4456 Signed-off-by: eschcam Change-Id: Ifa83fa9bc889920b9d29058870981a0ae0364240 --- asdctool/sdc-cassandra-init/Dockerfile | 8 +++++--- docs/conf.yaml | 7 ------- openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile | 8 +++++--- sdc-os-chef/sdc-cassandra/Dockerfile | 5 ++++- 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 docs/conf.yaml diff --git a/asdctool/sdc-cassandra-init/Dockerfile b/asdctool/sdc-cassandra-init/Dockerfile index cecb1f3c8a..82ac337921 100644 --- a/asdctool/sdc-cassandra-init/Dockerfile +++ b/asdctool/sdc-cassandra-init/Dockerfile @@ -8,9 +8,11 @@ RUN mkdir ~/.cassandra/ && \ echo 'version=3.4.4' >> ~/.cassandra/cqlshrc USER root -RUN apt-get update --allow-releaseinfo-change && apt-get install -y python-pip && \ - python -m pip install --upgrade pip \ - pip install cqlsh==6.0.0 && \ +RUN apt-get update --allow-releaseinfo-change && \ + apt-get purge python* -y && \ + apt-get install -y python3-pip && \ + python3 -m pip install --upgrade pip && \ + pip3 install cqlsh==6.1.0 && \ mkdir ~/.cassandra/ && \ echo '[cql]' > ~/.cassandra/cqlshrc && \ echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \ diff --git a/docs/conf.yaml b/docs/conf.yaml deleted file mode 100644 index ab5928131c..0000000000 --- a/docs/conf.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -project_cfg: onap -project: onap - -# Change this to ReleaseBranchName to modify the header -default-version: latest -# diff --git a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile index ce5fc02bd3..d2307b1380 100644 --- a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile +++ b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile @@ -8,9 +8,11 @@ RUN mkdir ~/.cassandra/ && \ echo 'version=3.4.4' >> ~/.cassandra/cqlshrc USER root -RUN apt-get update --allow-releaseinfo-change && apt-get install -y python-pip && \ - python -m pip install --upgrade pip \ - pip install cqlsh==6.0.0 && \ +RUN apt-get update --allow-releaseinfo-change && \ + apt-get purge python* -y && \ + apt-get install -y python3-pip && \ + python3 -m pip install --upgrade pip && \ + pip3 install cqlsh==6.1.0 && \ mkdir ~/.cassandra/ && \ echo '[cql]' > ~/.cassandra/cqlshrc && \ echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \ diff --git a/sdc-os-chef/sdc-cassandra/Dockerfile b/sdc-os-chef/sdc-cassandra/Dockerfile index 4671cb036c..2c62e387a0 100644 --- a/sdc-os-chef/sdc-cassandra/Dockerfile +++ b/sdc-os-chef/sdc-cassandra/Dockerfile @@ -6,9 +6,12 @@ RUN apt-get -o Acquire::Check-Valid-Until=false update && \ curl \ wget \ perl \ - python \ + python3 \ + python3-pip \ ntp && \ apt-get -y autoremove && \ + pip3 install cqlsh==6.1.0 && \ + rm -rf "/opt/cassandra/bin/cqlsh*" && \ curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v 13.12.14 COPY chef-solo /root/chef-solo/ -- 2.16.6