-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-kernel-addons
50 lines (36 loc) · 1.85 KB
/
Dockerfile-kernel-addons
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
43
44
45
46
47
48
49
50
# Using kernel WAS Libery image
FROM s390x/websphere-liberty:kernel
# Image by default operates by non-root user, so in order to do configuration we need to use root
USER root
# Creating JENKINS_HOME folder. Can be ignored/replaced by mounted storage for persistence
RUN mkdir -p /opt/jenkins && chmod g+rwx /opt/jenkins
# Updating repo's
RUN apt-get update
# Installing addons - wget requires for download from web, xz-utils are required for unpacking tar.xz archives, git is self-explenatory
RUN apt-get install -y wget xz-utils git
# Downloading jenkins lts generic java package. Other versions here - https://www.jenkins.io/download/. If no further configuration will be needed, you can use /config/dropins folder instead
RUN wget -P /config/apps/ https://get.jenkins.io/war-stable/2.235.5/jenkins.war
# Changing permissions to allow access for non-root users within the group
RUN chmod g+rwx /config/apps/jenkins.war
# Copying jvm.options and server.xml from this repo.
COPY --chown=1001:0 jvm.options /config/jvm.options
COPY --chown=1001:0 server.xml /config/
# Verbose argument will show you the output of configure.sh script
ARG VERBOSE=true
# Avoiding server double start & stop as part of creation of a SCC layer. Requires a lot of resources in case of true value
ARG OPENJ9_SCC=false
# Configuring server based on provided server.xml
RUN configure.sh
# Installing NodeJS
ARG NODE_VERSION=12.18.3
RUN wget https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-s390x.tar.xz
RUN tar -xf node-v${NODE_VERSION}-linux-s390x.tar.xz
RUN mv node-v${NODE_VERSION}-linux-s390x /usr/local/lib/nodejs
RUN chmod g+rwx /usr/local/lib/nodejs
# Adding NodeJS to PATH
ENV NODE_PATH /usr/local/lib/nodejs/lib/node_modules
ENV PATH /usr/local/lib/nodejs/bin:$PATH
# Exposing default http with remote agent port
EXPOSE 9080 9090
# Switching back to non-root user
USER 1001