commit | author | age
|
55f6e7
|
1 |
# ocb |
e9ab01
|
2 |
FROM registry.access.redhat.com/ubi8:latest |
55f6e7
|
3 |
|
SU |
4 |
# TODO: Put the maintainer name in the image metadata |
|
5 |
MAINTAINER Olaf Bohlen <obohlen@redhat.com> |
|
6 |
|
|
7 |
# TODO: Rename the builder environment variable to inform users about application you provide them |
e9ab01
|
8 |
ENV BUILDER_VERSION 0.3 |
55f6e7
|
9 |
|
SU |
10 |
# TODO: Set labels used in OpenShift to describe the builder image |
|
11 |
LABEL io.k8s.description="Platform for building C" \ |
e9ab01
|
12 |
io.k8s.display-name="builder 0.3.0" \ |
55f6e7
|
13 |
io.openshift.expose-services="8080:http" \ |
SU |
14 |
io.openshift.tags="builder,C,make" \ |
|
15 |
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \ |
|
16 |
io.openshift.s2i.destination="/tmp" |
|
17 |
|
|
18 |
# TODO: Install required packages here: |
e9ab01
|
19 |
RUN yum install -y gcc make autoconf automake libtool && \ |
55f6e7
|
20 |
yum clean all -y && \ |
43510e
|
21 |
mkdir /opt/app-root /opt/app-src && \ |
c78212
|
22 |
chown -R 1001:0 /opt/app-src |
55f6e7
|
23 |
|
SU |
24 |
# TODO (optional): Copy the builder files into /opt/app-root |
|
25 |
# COPY ./<builder_folder>/ /opt/app-root/ |
|
26 |
|
|
27 |
# 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 |
51d94f
|
28 |
COPY ./s2i/bin/ /usr/libexec/s2i |
55f6e7
|
29 |
|
SU |
30 |
# TODO: Drop the root user and make the content of /opt/app-root owned by user 1001 |
|
31 |
RUN chown -R 1001:1001 /opt/app-root |
|
32 |
|
|
33 |
# This default user is created in the openshift/base-centos7 image |
|
34 |
USER 1001 |
|
35 |
|
|
36 |
# TODO: Set the default port for applications built using this image |
|
37 |
EXPOSE 8080 |
|
38 |
|
|
39 |
# TODO: Set the default CMD for the image |
e9ab01
|
40 |
CMD ["/usr/libexec/s2i/usage"] |