forked from GaborWnuk/docker-usergrid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (36 loc) · 1.12 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
############################################################
# Dockerfile to run Apache usergrid_
# Based on Ubuntu Image
############################################################
# Set the base image to use to Ubuntu
FROM ubuntu
MAINTAINER Gabor Wnuk <[email protected]>
ENV TOMCAT_CONFIGURATION_FLAG /usergrid/.tomcat_admin_created
RUN mkdir /usergrid
WORKDIR /usergrid
RUN apt-get update ; apt-get install -y wget pwgen openjdk-7-jdk tomcat7
#
# Configure basic stuff, nothing important.
#
ADD create_tomcat_admin_user.sh /usergrid/create_tomcat_admin_user.sh
ADD run.sh /usergrid/run.sh
RUN chmod +x /usergrid/*.sh
RUN ln -s /etc/tomcat7/ /usr/share/tomcat7/conf
#
# Just to suppress tomcat warnings.
#
RUN mkdir -p /usr/share/tomcat7/common/classes; \
mkdir -p /usr/share/tomcat7/server/classes; \
mkdir -p /usr/share/tomcat7/shared/classes; \
mkdir -p /usr/share/tomcat7/webapps; \
mkdir -p /usr/share/tomcat7/temp
#
# Deploy WAR
RUN mkdir /usergrid/ROOT
ADD ROOT.war /usergrid/ROOT/ROOT.war
# ADD ROOT.war /usr/share/tomcat7/webapps/ROOT.war
#
# Port to expose (default for tomcat: 8080)
#
EXPOSE 8080
ENTRYPOINT ./run.sh