-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile.ispn_perf_test
51 lines (32 loc) · 1.55 KB
/
Dockerfile.ispn_perf_test
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
FROM belaban/alpine
LABEL maintainer Bela Ban <[email protected]>
ENV HOME /opt/jgroups
ENV PATH $PATH:$HOME/IspnPerfTest/bin
WORKDIR /opt/jgroups
# Create a user and group used to launch processes
# The user ID 1000 is the default for the first "regular" user on Fedora/RHEL,
# so there is a high chance that this ID will be equal to the current user
# making it easier to use volumes (no permission issues)
RUN mkdir -p /opt/jgroups \
&& addgroup -S jgroups -g 1000 \
&& adduser -u 1000 -S -G jgroups -h /opt/jgroups -s /sbin/nologin jgroups \
&& echo root:root | chpasswd ; echo jgroups:jgroups | chpasswd \
&& printf "\njgroups ALL=(ALL) NOPASSWD: ALL\n" >> /etc/sudoers
EXPOSE 7800-7900:7800-7900 9000-9100:9000-9100
USER root
### Not supported by docker as of March 2017:
#RUN printf "net.core.rmem_max = 20000000\nnet.core.wmem_max = 10000000\n" >> /etc/sysctl.conf
# Run everything below as the jgroups user:
USER jgroups
## Download JGroups src code and build JAR
RUN git clone https://github.com/belaban/IspnPerfTest.git \
&& cd IspnPerfTest \
&& mvn -DskipTests=true install dependency:go-offline
### mvn -B dependency:resolve dependency:resolve-plugins
RUN chown -R jgroups.jgroups $HOME/* \
&& chmod -R u+x $HOME/*
# ENTRYPOINT ["IspnPerfTest/bin/perf-test.sh", "-nohup"]
# CMD ["-factory ispn", "-cfg IspnPerfTest/conf/dist-sync.xml"]
#CMD $HOME/IspnPerfTest/bin/perf-test.sh -nohup $* &> /tmp/IspnPerfTest.log
## exec replaces the shell with the command so the kill signal can be caught
CMD exec $HOME/IspnPerfTest/bin/perf-test.sh -nohup $*