# ocb
|
FROM rhel7
|
|
# TODO: Put the maintainer name in the image metadata
|
MAINTAINER Olaf Bohlen <obohlen@redhat.com>
|
|
# TODO: Rename the builder environment variable to inform users about application you provide them
|
ENV BUILDER_VERSION 0.1
|
|
# TODO: Set labels used in OpenShift to describe the builder image
|
LABEL io.k8s.description="Platform for building C" \
|
io.k8s.display-name="builder 0.1.0" \
|
io.openshift.expose-services="8080:http" \
|
io.openshift.tags="builder,C,make" \
|
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
|
io.openshift.s2i.destination="/tmp"
|
|
COPY training.repo redhat.repo rhel_dvd.repo /etc/yum.repos.d/
|
|
# TODO: Install required packages here:
|
RUN yum install -y gcc-4.8.5-11.el7 autoconf automake libtool && \
|
yum clean all -y && \
|
mkdir /opt/app-root /opt/app-src && \
|
chown 1001:0 /opt/app-root /opt/app-src
|
|
# TODO (optional): Copy the builder files into /opt/app-root
|
# COPY ./<builder_folder>/ /opt/app-root/
|
|
# TODO: Copy the S2I scripts to /usr/libexec/s2i, since openshift/base-centos7 image sets io.openshift.s2i.scripts-url label that way, or update that label
|
COPY ./.s2i/bin/ /usr/libexec/s2i
|
|
# TODO: Drop the root user and make the content of /opt/app-root owned by user 1001
|
RUN chown -R 1001:1001 /opt/app-root
|
|
# This default user is created in the openshift/base-centos7 image
|
USER 1001
|
|
# TODO: Set the default port for applications built using this image
|
EXPOSE 8080
|
|
# TODO: Set the default CMD for the image
|
CMD ["usage"]
|