#
# This is the official OpenShift Origin image. It has as its entrypoint the OpenShift
# all-in-one binary.
#
# While this image can be used for a simple node it does not support OVS based
# SDN or storage plugins required for EBS, GCE, Gluster, Ceph, or iSCSI volume
# management. For those features please use 'openshift/node'
#
# The standard name for this image is openshift/origin
#
FROM registry.fedoraproject.org/f28/origin-base:latest

ENV NAME=origin \
    VERSION=3.9 \
    ARCH=x86_64

COPY system-container/system-container-wrapper.sh /usr/local/bin/
COPY system-container/config.json.template system-container/manifest.json system-container/service.template system-container/tmpfiles.template /exports/
RUN INSTALL_PKGS="origin" && \
    dnf install -y ${INSTALL_PKGS} && \
    rpm -V ${INSTALL_PKGS} && \
    dnf clean all && \
    setcap 'cap_net_bind_service=ep' /usr/bin/openshift

LABEL io.k8s.display-name="OpenShift Origin Application Platform" \
      io.k8s.description="OpenShift Origin is a platform for developing, building, and deploying containerized applications." \
      summary="OpenShift Origin is a platform for developing, building, and deploying containerized applications." \
      io.openshift.tags="openshift,core" \
      maintainer="Jakub Cajka <jcajka@fedoraproject.org>" \
      License="GPLv2+" \
      name="$FGC/$NAME" \
      com.redhat.component="origin" \
      version="$VERSION" \
      architecture="$ARCH" \
      usage="Image used for deployment of openshift origin"

COPY README.md README.md

ENV HOME=/root \
    OPENSHIFT_CONTAINERIZED=true \
    KUBECONFIG=/var/lib/origin/openshift.local.config/master/admin.kubeconfig

WORKDIR /var/lib/origin
EXPOSE 8443 53

ENTRYPOINT ["/usr/bin/openshift"]
