diff --git a/Dockerfile b/Dockerfile index 18ad4700..8980c354 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.rst b/README.rst index 76c76ca0..1d804a1b 100644 --- a/README.rst +++ b/README.rst @@ -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 /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