forked from fbascheper/SoapUI-MockService-Docker-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·87 lines (64 loc) · 2.99 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
#######################################################################
# Create an extensible SoapUI mock service runner image using CentOS
#######################################################################
# Use the centos 6.6 base image
FROM centos:6.6
MAINTAINER fbascheper <[email protected]>
# Update the system
RUN yum -y update;yum clean all
##########################################################
# Install Java JDK
##########################################################
RUN yum -y install wget && \
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm && \
echo "50ae04f69743921dd6082dfe978672ad jdk-8u45-linux-x64.rpm" >> MD5SUM && \
md5sum -c MD5SUM && \
rpm -Uvh jdk-8u45-linux-x64.rpm && \
yum -y remove wget && \
rm -f jdk-8u45-linux-x64.rpm MD5SUM
ENV JAVA_HOME /usr/java/jdk1.8.0_45
##########################################################
# Download and unpack soapui
##########################################################
RUN groupadd -r soapui && useradd -r -g soapui -m -d /home/soapui soapui
RUN yum -y install wget && yum -y install tar && \
wget --no-check-certificate --no-cookies http://heanet.dl.sourceforge.net/project/soapui/soapui/5.1.3/SoapUI-5.1.3-linux-bin.tar.gz && \
echo "69497d409c2e6038f3c684741ffe3566 SoapUI-5.1.3-linux-bin.tar.gz" >> MD5SUM && \
md5sum -c MD5SUM && \
tar -xzf SoapUI-5.1.3-linux-bin.tar.gz -C /home/soapui && \
yum -y remove wget && yum -y remove tar && \
rm -f SoapUI-5.1.3-linux-bin.tar.gz MD5SUM
RUN chown -R soapui:soapui /home/soapui
RUN find /home/soapui -type d -execdir chmod 770 {} \;
RUN find /home/soapui -type f -execdir chmod 660 {} \;
RUN yum -y install curl && \
curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.3/gosu-amd64" && \
chmod +x /usr/local/bin/gosu
############################################
# Setup MockService runner
############################################
USER soapui
ENV HOME /home/soapui
ENV SOAPUI_DIR /home/soapui/SoapUI-5.1.3
ENV SOAPUI_PRJ /home/soapui/soapui-prj
############################################
# Add customization sub-directories (for entrypoint)
############################################
ADD docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
ADD soapui-prj $SOAPUI_PRJ
############################################
# Expose ports and start SoapUI mock service
############################################
USER root
EXPOSE 8080
COPY docker-entrypoint.sh /
RUN chmod 700 /docker-entrypoint.sh
RUN chmod 770 $SOAPUI_DIR/bin/*.sh
RUN chown -R soapui:soapui $SOAPUI_PRJ
RUN find $SOAPUI_PRJ -type d -execdir chmod 770 {} \;
RUN find $SOAPUI_PRJ -type f -execdir chmod 660 {} \;
############################################
# Start SoapUI mock service runner
############################################
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["start-soapui"]