forked from chardek/docker-bbjservices
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (39 loc) · 2 KB
/
Dockerfile
File metadata and controls
51 lines (39 loc) · 2 KB
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
FROM frolvlad/alpine-glibc
ARG license_server
EXPOSE 8888
# BBj install options
ADD playback.properties /tmp/playback.properties
# Provided by the customer
# Download the BBj install jar from https://basis.cloud/bbj-downloads/
ADD BBj*.jar /tmp/BBj.jar
# Use the certificate.bls from the BLS server you intend to use
ADD certificate.bls /tmp/certificate.bls
# Install java
RUN apk update; \
apk --no-cache add openjdk21-jdk
# Put the license_server argument into the playback file before installing
RUN sed -i "s/LICENSE_SERVER_PLACEHOLDER/${license_server}/g" /tmp/playback.properties
# Install BBj using the install jar and the recorded install options
RUN java -Djdk.lang.Process.launchMechanism=vfork -jar /tmp/BBj.jar -p /tmp/playback.properties
RUN sed -i 's/basis.java.args.BBjServices=-server/basis.java.args.BBjServices=-server -Djdk.lang.Process.launchMechanism\=vfork/g' /opt/bbx/cfg/BBj.properties
RUN sed -i 's/com.basis.admin.defaultAdminUserWarning=true/com.basis.admin.defaultAdminUserWarning=false/g' /opt/bbx/cfg/BBj.properties
RUN sed -i 's/com.basis.bbj.comm.ThinClientServer.webUser=nobody/com.basis.bbj.comm.ThinClientServer.webUser=root/g' /opt/bbx/cfg/BBj.properties
#this should probably go not to the end but within the provisioned user-block:
RUN echo "umask 0" >> /opt/bbx/bin/.envsetup
RUN echo "echo 'Container running. Give the service a few seconds to start.'" >> /opt/bbx/bin/bbjservices
RUN echo "wait" >> /opt/bbx/bin/bbjservices
#RUN echo "while true; do sleep 1000; done" >> /opt/bbx/bin/bbjservices
#cleanup
RUN rm -fr /tmp/* ; \
rm -fr /opt/bbx/cache/* ; \
rm -fr /opt/bbx/logs/* ; \
rm -fr /opt/bbx/libnative/aix ; \
rm -fr /opt/bbx/libnative/hp-ux ; \
rm -fr /opt/bbx/libnative/sunos ; \
rm -fr /opt/bbx/libnative/windows ; \
rm -fr "/opt/bbx/libnative/mac os x" ; \
rm -fr /opt/bbx/documentation ; \
rm -rf /opt/bbx/cfg/.git
RUN rm -fr /opt/bbx/lib/aws*.jar ; \
rm -f /opt/bbx/lib/BBjTextSearc*.jar;
CMD [ "/opt/bbx/bin/bbjservices", "--launchd" ]