Merge "Improved Dockefile and simplified use instructions."

This commit is contained in:
Zuul 2021-02-25 10:25:49 +00:00 committed by Gerrit Code Review
commit 2d34c59bf1
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