summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: eecf3630b23adf6f8b02cb3b0519f875e2498a51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Using playbook2image as a base
# See https://github.com/aweiteka/playbook2image for details on the image
# including documentation for the settings/env vars referenced below
FROM docker.io/aweiteka/playbook2image:latest

MAINTAINER OpenShift Team <dev@lists.openshift.redhat.com>

LABEL name="openshift-ansible" \
      summary="OpenShift's installation and configuration tool" \
      description="A containerized openshift-ansible image to let you run playbooks to install, upgrade, maintain and check an OpenShift cluster" \
      url="https://github.com/openshift/openshift-ansible" \
      io.k8s.display-name="openshift-ansible" \
      io.k8s.description="A containerized openshift-ansible image to let you run playbooks to install, upgrade, maintain and check an OpenShift cluster" \
      io.openshift.expose-services="" \
      io.openshift.tags="openshift,install,upgrade,ansible"

USER root

RUN INSTALL_PKGS="skopeo" && \
    yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
    rpm -V $INSTALL_PKGS && \
    yum clean all

USER ${USER_UID}

# The playbook to be run is specified via the PLAYBOOK_FILE env var.
# This sets a default of openshift_facts.yml as it's an informative playbook
# that can help test that everything is set properly (inventory, sshkeys)
ENV PLAYBOOK_FILE=playbooks/byo/openshift_facts.yml \
    OPTS="-v" \
    INSTALL_OC=true

# playbook2image's assemble script expects the source to be available in
# /tmp/src (as per the source-to-image specs) so we import it there
ADD . /tmp/src

# Running the 'assemble' script provided by playbook2image will install
# dependencies specified in requirements.txt and install the 'oc' client
# as per the INSTALL_OC environment setting above
RUN /usr/libexec/s2i/assemble

CMD [ "/usr/libexec/s2i/run" ]