Improved Dockefile and simplified use instructions.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ia4e46f8ce13e36c08d55db729004ad6b3d9aaa87
This commit is contained in:
Jiri Podivin 2021-02-11 10:09:19 +01:00
parent e4eaf3fda1
commit 4fabb3d2b5
2 changed files with 16 additions and 13 deletions

View File

@ -1,18 +1,25 @@
FROM centos:latest
RUN dnf install -y git python3-pip gcc python3-devel
LABEL name="VF develoment dockerfile"
LABEL version="0.2"
LABEL description="Provides environment for development of new validations."
RUN git clone https://opendev.org/openstack/validations-libs /root/validations-libs
RUN dnf install -y git python3-pip gcc python3-devel jq
COPY . /root/validations-libs
RUN git clone https://opendev.org/openstack/validations-common /root/validations-common
RUN python3 -m pip install cryptography==3.3
RUN cd /root/validations-libs && \
pip3 install -r requirements.txt && \
python3 setup.py install
python3 -m pip install . && \
python3 -m pip install -r test-requirements.txt
RUN cd /root/validations-common && \
pip3 install -r requirements.txt && \
python3 setup.py install
python3 -m pip install . && \
python3 -m pip install -r test-requirements.txt
RUN ln -s /usr/local/share/ansible /usr/share/ansible
RUN mkdir /etc/ansible && \
echo "localhost ansible_connection=local" > /etc/ansible/hosts
RUN mkdir -p /var/log/validations

View File

@ -24,14 +24,10 @@ Build the container from the Dockerfile by running::
docker build -t "vf:dockerfile" .
Once the build is finished you can check the image id::
docker images
Then you can run the container and start to run some builtin Validations::
docker run -ti <image_id> /bin/bash
docker run -ti vf:dockerfile /bin/bash
Then run validations::
validation.py run --validation check-ftype,512e
validation.py run --validation check-ftype,512e --inventory /etc/ansible/hosts