From 14a681b809a5cd57864b197205529e3700315e57 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Fri, 8 Jul 2022 16:53:55 +0200 Subject: [PATCH] Using UBI9 as base for VF development containers Centos container file[0] has not been updated in considerable time and is increasingly out of sync with environment VF is meant to interact with. Moving to UBI9[1] should prevent potential issues of stemming from aformentioned divergence. Furthermore, several minor stylistic issues of the existing container file were resolved, such as comments and uperfluous commands. Consequently the version was incremented to 1.0. [0]https://hub.docker.com/_/centos [1]https://hub.docker.com/r/redhat/ubi9 Signed-off-by: Jiri Podivin Change-Id: Ied821c2a7210d8131e154020272c46048372af29 --- Dockerfile | 30 +++++++++++-------------- dockerfiles/localvalidations/Dockerfile | 30 +++++++++++-------------- 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3ea3b19..47a238d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,26 @@ -FROM centos:latest +FROM redhat/ubi9:latest -LABEL name="VF development dockerfile" -LABEL version="0.4" +LABEL name="VF development container file" +LABEL version="1.0" LABEL description="Provides environment for development of new validations." RUN dnf install -y git python3-pip gcc python3-devel jq -#We copy contents of the local validations-libs repo with all of our changes +# Copy contents of the local validations-libs repo with all of our changes COPY . /root/validations-libs -#validations-common repo is cloned +# validations-common repo is cloned RUN git clone https://opendev.org/openstack/validations-common /root/validations-common -RUN python3 -m pip install cryptography==3.3 +RUN python3 -m pip install /root/validations-libs &&\ + python3 -m pip install -r /root/validations-libs/test-requirements.txt -RUN cd /root/validations-libs && \ - python3 -m pip install . && \ - python3 -m pip install -r test-requirements.txt +RUN python3 -m pip install /root/validations-common -RUN cd /root/validations-common && \ - python3 -m pip install . - -#Setting up the default directory structure for both ansible, -#and the VF -RUN ln -s /usr/local/share/ansible /usr/share/ansible && \ +# Setting up the default directory structure for both ansible, +# and the VF +RUN ln -s /usr/local/share/ansible /usr/share/ansible &&\ mkdir -p /var/log/validations -#Simplified ansible inventory is created, containing only localhost, -#and defining the connection as local. +# Simplified ansible inventory is created, containing only localhost, +# and defining the connection as local. RUN mkdir -p /etc/ansible && \ echo "localhost ansible_connection=local" > /etc/ansible/hosts diff --git a/dockerfiles/localvalidations/Dockerfile b/dockerfiles/localvalidations/Dockerfile index e3ea3b19..47a238d3 100644 --- a/dockerfiles/localvalidations/Dockerfile +++ b/dockerfiles/localvalidations/Dockerfile @@ -1,30 +1,26 @@ -FROM centos:latest +FROM redhat/ubi9:latest -LABEL name="VF development dockerfile" -LABEL version="0.4" +LABEL name="VF development container file" +LABEL version="1.0" LABEL description="Provides environment for development of new validations." RUN dnf install -y git python3-pip gcc python3-devel jq -#We copy contents of the local validations-libs repo with all of our changes +# Copy contents of the local validations-libs repo with all of our changes COPY . /root/validations-libs -#validations-common repo is cloned +# validations-common repo is cloned RUN git clone https://opendev.org/openstack/validations-common /root/validations-common -RUN python3 -m pip install cryptography==3.3 +RUN python3 -m pip install /root/validations-libs &&\ + python3 -m pip install -r /root/validations-libs/test-requirements.txt -RUN cd /root/validations-libs && \ - python3 -m pip install . && \ - python3 -m pip install -r test-requirements.txt +RUN python3 -m pip install /root/validations-common -RUN cd /root/validations-common && \ - python3 -m pip install . - -#Setting up the default directory structure for both ansible, -#and the VF -RUN ln -s /usr/local/share/ansible /usr/share/ansible && \ +# Setting up the default directory structure for both ansible, +# and the VF +RUN ln -s /usr/local/share/ansible /usr/share/ansible &&\ mkdir -p /var/log/validations -#Simplified ansible inventory is created, containing only localhost, -#and defining the connection as local. +# Simplified ansible inventory is created, containing only localhost, +# and defining the connection as local. RUN mkdir -p /etc/ansible && \ echo "localhost ansible_connection=local" > /etc/ansible/hosts