From 4723feba37f32aff038b78affb66a35fd9d7f50d Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Mon, 20 Dec 2021 11:03:35 +0800 Subject: [PATCH] Create dockerfile --- scripts/dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/dockerfile diff --git a/scripts/dockerfile b/scripts/dockerfile new file mode 100644 index 00000000..1649dd02 --- /dev/null +++ b/scripts/dockerfile @@ -0,0 +1,20 @@ +FROM ansible/ansible:centos7 + +LABEL Description="DevOps for ansible runtime" Vendor="Websoft9" Version="1.0.0" + +WORKDIR "/ansible" + +# Install ansible +RUN yum install ansible -y + +# Install role_common +RUN git clone https://github.com/Websoft9/role_common +RUN ansible-playbook role_common/tests/test.yml + +# download template of role, it's to run the tasks of you want to test +RUN git clone https://github.com/Websoft9/role_test + +VOLUME "/ansible" + +# Define the entry point for the docker container. +CMD ["bash" "-c" "echo ansible RunTime is OK!"]