forked from xwiki/xwiki-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (28 loc) · 1.37 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
FROM debian:wheezy
MAINTAINER Fabio Mancinelli [email protected]
# Set the mount points
VOLUME ["/var/lib/mysql", "/var/lib/xwiki"]
# Install JDK + MySQL + Tomcat7 + XWiki
RUN (apt-get update && \
apt-get install -y openjdk-7-jdk && \
apt-get install -y tomcat7 && \
echo "mysql-server mysql-server/root_password password your_password" | /usr/bin/debconf-set-selections && \
echo "mysql-server mysql-server/root_password_again password your_password" | /usr/bin/debconf-set-selections && \
apt-get install -y mysql-server && \
apt-get install -y wget && \
apt-get install -y unzip && \
wget -P /tmp http://download.forge.ow2.org/xwiki/xwiki-enterprise-web-7.0.war && \
unzip -d /var/lib/tomcat7/webapps/xwiki /tmp/xwiki-enterprise-web-7.0.war && \
wget -P /var/lib/tomcat7/webapps/xwiki/WEB-INF/lib http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.35/mysql-connector-java-5.1.35.jar && \
mkdir -p /var/lib/xwiki && \
chown tomcat7:tomcat7 /var/lib/xwiki && \
mkdir -p /var/lib/tomcat7/bin && \
chown tomcat7:tomcat7 /var/lib/tomcat7/bin && \
apt-get clean)
# Inject configuration files
ADD ["files/hibernate.cfg.xml", "files/xwiki.properties", "/var/lib/tomcat7/webapps/xwiki/WEB-INF/"]
ADD ["files/start_xwiki.sh", "/"]
# Define the startup command
CMD ["/start_xwiki.sh"]
# Expose port
EXPOSE 8080