Improved Dockefile and simplified use instructions.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: Ia4e46f8ce13e36c08d55db729004ad6b3d9aaa87
This commit is contained in:
parent
e4eaf3fda1
commit
4fabb3d2b5
21
Dockerfile
21
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user