Dockerfile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. FROM centos:7
  2. MAINTAINER OpenShift Team <dev@lists.openshift.redhat.com>
  3. USER root
  4. # Add origin repo for including the oc client
  5. COPY images/installer/origin-extra-root /
  6. # install ansible and deps
  7. RUN INSTALL_PKGS="python-lxml pyOpenSSL python2-cryptography openssl java-1.8.0-openjdk-headless python2-passlib httpd-tools openssh-clients origin-clients" \
  8. && yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS \
  9. && echo '[google-cloud-sdk]' > /etc/yum.repos.d/google-cloud-sdk.repo \
  10. && echo 'baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64' >> /etc/yum.repos.d/google-cloud-sdk.repo \
  11. && echo 'enabled=1' >> /etc/yum.repos.d/google-cloud-sdk.repo \
  12. && echo 'gpgcheck=1' >> /etc/yum.repos.d/google-cloud-sdk.repo \
  13. && echo 'repo_gpgcheck=1' >> /etc/yum.repos.d/google-cloud-sdk.repo \
  14. && echo 'gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg' >> /etc/yum.repos.d/google-cloud-sdk.repo \
  15. && echo ' https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg' >> /etc/yum.repos.d/google-cloud-sdk.repo \
  16. && EPEL_PKGS="ansible python2-boto google-cloud-cdk" \
  17. && yum install -y epel-release \
  18. && yum install -y --setopt=tsflags=nodocs $EPEL_PKGS \
  19. && rpm -V $INSTALL_PKGS $EPEL_PKGS \
  20. && yum clean all
  21. LABEL name="openshift/origin-ansible" \
  22. summary="OpenShift's installation and configuration tool" \
  23. description="A containerized openshift-ansible image to let you run playbooks to install, upgrade, maintain and check an OpenShift cluster" \
  24. url="https://github.com/openshift/openshift-ansible" \
  25. io.k8s.display-name="openshift-ansible" \
  26. io.k8s.description="A containerized openshift-ansible image to let you run playbooks to install, upgrade, maintain and check an OpenShift cluster" \
  27. io.openshift.expose-services="" \
  28. io.openshift.tags="openshift,install,upgrade,ansible" \
  29. atomic.run="once"
  30. ENV USER_UID=1001 \
  31. HOME=/opt/app-root/src \
  32. WORK_DIR=/usr/share/ansible/openshift-ansible \
  33. OPTS="-v"
  34. # Add image scripts and files for running as a system container
  35. COPY images/installer/root /
  36. # Include playbooks, roles, plugins, etc. from this repo
  37. COPY . ${WORK_DIR}
  38. RUN /usr/local/bin/user_setup \
  39. && rm /usr/local/bin/usage.ocp
  40. USER ${USER_UID}
  41. WORKDIR ${WORK_DIR}
  42. ENTRYPOINT [ "/usr/local/bin/entrypoint" ]
  43. CMD [ "/usr/local/bin/run" ]