-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
89 lines (74 loc) · 2.14 KB
/
Dockerfile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM centos:7
MAINTAINER Mark McCahill "[email protected]"
USER root
RUN yum -y update && \
yum -y install \
dos2unix \
wget \
unzip; \
yum clean all
RUN cd /opt
#
# set the locale
#
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
################## start OpenJDK ######################
#
RUN yum -y update && \
yum -y install \
java-1.8.0-openjdk.x86_64 \
java-1.8.0-openjdk-devel.x86_64 ; \
mkdir /usr/java ; \
ln -s /etc/alternatives/java_sdk_1.8.0_openjdk /usr/java/jdk1.8.0_77 ; \
ln -s /usr/java/jdk1.8.0_77 /usr/java/latest ; \
yum clean all
#
################## end OpenJDK ##################
#
# try to make sure we use UTF for the JVM
#
ENV JAVA_TOOL_OPTIONS "-Dfile.encoding=UTF-8 "
#
# mysql connector and expect
#
RUN yum -y update && \
yum -y install \
mysql-connector-java \
expect ; \
yum clean all
#
# grouper
#
ADD ./configs /build-configs
RUN useradd grouper
USER grouper
RUN mkdir /home/grouper/2.2.2 ; \
cd /home/grouper/2.2.2/ ; \
wget http://software.internet2.edu/grouper/release/2.2.2/grouperInstaller.jar
USER root
RUN export JAVA_HOME=/usr/java/latest ; \
cd /home/grouper/2.2.2/ ; \
expect /build-configs/grouper-install-expect.exp
#
# things we need assuming we end up running systemd
#
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
#
# add a systemd service so Grouper starts automatically
#
RUN cp /build-configs/grouper.service /etc/systemd/system/grouper.service ; \
chmod 664 /etc/systemd/system/grouper.service
RUN systemctl enable grouper.service
EXPOSE 8080
CMD ["/usr/sbin/init"]