2022-07-08 14:53:55 +00:00
|
|
|
FROM redhat/ubi9:latest
|
2021-02-12 10:31:09 +00:00
|
|
|
|
2022-07-08 14:53:55 +00:00
|
|
|
LABEL name="VF development container file"
|
|
|
|
LABEL version="1.0"
|
2021-02-12 10:31:09 +00:00
|
|
|
LABEL description="Provides environment for development of new validations."
|
|
|
|
|
|
|
|
RUN dnf install -y git python3-pip gcc python3-devel jq
|
|
|
|
|
2022-07-08 14:53:55 +00:00
|
|
|
# Copy contents of the local validations-libs repo with all of our changes
|
2021-02-12 10:31:09 +00:00
|
|
|
COPY . /root/validations-libs
|
2022-07-08 14:53:55 +00:00
|
|
|
# validations-common repo is cloned
|
2021-02-12 10:31:09 +00:00
|
|
|
RUN git clone https://opendev.org/openstack/validations-common /root/validations-common
|
|
|
|
|
2022-07-08 14:53:55 +00:00
|
|
|
RUN python3 -m pip install /root/validations-libs &&\
|
|
|
|
python3 -m pip install -r /root/validations-libs/test-requirements.txt
|
2021-02-12 10:31:09 +00:00
|
|
|
|
2022-07-08 14:53:55 +00:00
|
|
|
RUN python3 -m pip install /root/validations-common
|
2021-02-12 10:31:09 +00:00
|
|
|
|
2022-07-08 14:53:55 +00:00
|
|
|
# Setting up the default directory structure for both ansible,
|
|
|
|
# and the VF
|
|
|
|
RUN ln -s /usr/local/share/ansible /usr/share/ansible &&\
|
2021-02-12 10:31:09 +00:00
|
|
|
mkdir -p /var/log/validations
|
2022-07-08 14:53:55 +00:00
|
|
|
# Simplified ansible inventory is created, containing only localhost,
|
|
|
|
# and defining the connection as local.
|
2021-02-12 10:31:09 +00:00
|
|
|
RUN mkdir -p /etc/ansible && \
|
|
|
|
echo "localhost ansible_connection=local" > /etc/ansible/hosts
|