commit | author | age
|
20e36b
|
1 |
# s2i-gradle-kbs |
OB |
2 |
## ATTENTION ## |
|
3 |
# This is a demo, do not use for anything else. |
|
4 |
# no warranty, if it breaks your systems, you have to keep the pieces. |
|
5 |
# Olaf Bohlen, obohlen@redhat.com, 2022-11-30 |
|
6 |
FROM registry.access.redhat.com/ubi9 |
|
7 |
|
|
8 |
# TODO: Put the maintainer name in the image metadata |
|
9 |
LABEL maintainer="Olaf Bohlen <obohlen@redhat.com>" |
|
10 |
|
|
11 |
# TODO: Rename the builder environment variable to inform users about application you provide them |
|
12 |
ENV BUILDER_VERSION 0.1 \ |
|
13 |
PATH=${PATH}:/opt/gradle/gradle-7.6/bin |
|
14 |
|
|
15 |
# TODO: Set labels used in OpenShift to describe the builder image |
|
16 |
LABEL io.k8s.description="Platform for building springboot with Gradle" \ |
|
17 |
io.k8s.display-name="builder 0.1.0" \ |
|
18 |
io.openshift.expose-services="8080:http" \ |
|
19 |
io.openshift.tags="builder,jee,java,gradle" |
|
20 |
|
|
21 |
# TODO: Install required packages here: |
|
22 |
# RUN yum install -y ... && yum clean all -y |
|
23 |
RUN yum install -y java-11-openjdk unzip && \ |
|
24 |
yum clean all -y && \ |
|
25 |
mkdir -p /opt/gradle /opt/app-root /opt/app-src && \ |
|
26 |
cd /opt/gradle && \ |
|
27 |
curl -o /tmp/gradle.zip https://downloads.gradle-dn.com/distributions/gradle-7.6-bin.zip && \ |
|
28 |
unzip -d /opt/gradle /tmp/gradle.zip && \ |
|
29 |
chown -R 1001:1001 /opt/app-root && \ |
|
30 |
chown -R 1001:0 /opt/app-src |
|
31 |
|
|
32 |
# TODO: Copy the S2I scripts to /usr/libexec/s2i, since openshift/base-centos7 image |
|
33 |
# sets io.openshift.s2i.scripts-url label that way, or update that label |
|
34 |
COPY ./s2i/bin/ /usr/libexec/s2i |
|
35 |
|
|
36 |
# This default user is created in the openshift/base-centos7 image |
|
37 |
USER 1001 |
|
38 |
|
|
39 |
# TODO: Set the default port for applications built using this image |
|
40 |
EXPOSE 8080 |
|
41 |
|
|
42 |
# TODO: Set the default CMD for the image |
|
43 |
CMD ["/usr/libexec/s2i/usage"] |