Browse Source

Updated Dockerfile not to clone openshift-ansible repo.
Movied Dockerfile to openshift-ansible repo root and updated
README_ANSIBLE_CONTAINER.md file.

Avesh Agarwal 9 years ago
parent
commit
85c12d9893
2 changed files with 6 additions and 4 deletions
  1. 5 3
      ansible-container/Dockerfile
  2. 1 1
      README_ANSIBLE_CONTAINER.md

+ 5 - 3
ansible-container/Dockerfile

@@ -6,10 +6,12 @@ RUN yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.no
 
 # Not sure if all of these packages are necessary
 # only git and ansible are known requirements
-RUN yum install -y --enablerepo rhel-7-server-extras-rpms net-tools bind-utils tmux git ansible
+RUN yum install -y --enablerepo rhel-7-server-extras-rpms net-tools bind-utils git ansible
 
-RUN git clone https://github.com/openshift/openshift-ansible.git /opt/openshift-ansible
+ADD ./  /opt/openshift-ansible/
 
-ENTRYPOINT ["/usr/bin/ansible-playbook", "/opt/openshift-ansible/playbooks/byo/config.yml"]
+ENTRYPOINT ["/usr/bin/ansible-playbook"]
+
+CMD ["/opt/openshift-ansible/playbooks/byo/config.yml"]
 
 LABEL RUN docker run -it --rm --privileged --net=host -v ~/.ssh:/root/.ssh -v /etc/ansible:/etc/ansible --name NAME -e NAME=NAME -e IMAGE=IMAGE IMAGE

+ 1 - 1
README_ANSIBLE_CONTAINER.md

@@ -3,7 +3,7 @@
 
   ```sh
   git clone https://github.com/openshift/openshift-ansible.git
-  cd openshift-ansible/ansible-container
+  cd openshift-ansible
   docker build --rm -t ansible .
   ```
 * Create /etc/ansible directory on the host machine and copy inventory file (hosts) into it.