Dockerfile.rhel7 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. FROM openshift3/playbook2image
  2. MAINTAINER OpenShift Team <dev@lists.openshift.redhat.com>
  3. # override env vars from base image
  4. ENV SUMMARY="OpenShift's installation and configuration tool" \
  5. DESCRIPTION="A containerized openshift-ansible image to let you run playbooks to install, upgrade, maintain and check an OpenShift cluster"
  6. LABEL name="openshift3/ose-ansible" \
  7. summary="$SUMMARY" \
  8. description="$DESCRIPTION" \
  9. url="https://github.com/openshift/openshift-ansible" \
  10. io.k8s.display-name="openshift-ansible" \
  11. io.k8s.description="$DESCRIPTION" \
  12. io.openshift.expose-services="" \
  13. io.openshift.tags="openshift,install,upgrade,ansible" \
  14. com.redhat.component="aos3-installation-docker" \
  15. version="v3.6.0" \
  16. release="1" \
  17. architecture="x86_64"
  18. # Playbooks, roles and their dependencies are installed from packages.
  19. # Unlike in Dockerfile, we don't invoke the 'assemble' script here
  20. # because all content and dependencies (like 'oc') is already
  21. # installed via yum.
  22. USER root
  23. RUN INSTALL_PKGS="atomic-openshift-utils atomic-openshift-clients python-boto skopeo openssl java-1.8.0-openjdk-headless httpd-tools" && \
  24. yum repolist > /dev/null && \
  25. yum-config-manager --enable rhel-7-server-ose-3.6-rpms && \
  26. yum-config-manager --enable rhel-7-server-rh-common-rpms && \
  27. yum install -y $INSTALL_PKGS && \
  28. yum clean all
  29. # The symlinks below are a (hopefully temporary) hack to work around the fact that this
  30. # image is based on python s2i which uses the python27 SCL instead of system python,
  31. # and so the system python modules we need would otherwise not be in the path.
  32. RUN ln -s /usr/lib/python2.7/site-packages/{boto,passlib} /opt/app-root/lib64/python2.7/
  33. USER ${USER_UID}
  34. # The playbook to be run is specified via the PLAYBOOK_FILE env var.
  35. # This sets a default of openshift_facts.yml as it's an informative playbook
  36. # that can help test that everything is set properly (inventory, sshkeys).
  37. # As the playbooks are installed via packages instead of being copied to
  38. # $APP_HOME by the 'assemble' script, we set the WORK_DIR env var to the
  39. # location of openshift-ansible.
  40. ENV PLAYBOOK_FILE=playbooks/byo/openshift_facts.yml \
  41. ANSIBLE_CONFIG=/usr/share/atomic-openshift-utils/ansible.cfg \
  42. WORK_DIR=/usr/share/ansible/openshift-ansible \
  43. OPTS="-v"
  44. # Add files for running as a system container
  45. COPY system-container/root /
  46. CMD [ "/usr/libexec/s2i/run" ]