Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Commit 4e0be0c

Browse files
committed
Dockerfile added
1 parent 1d5dba0 commit 4e0be0c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

Dockerfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM phusion/baseimage:0.9.13
2+
MAINTAINER Markus List <[email protected]>
3+
#adapted from https://raw.githubusercontent.com/mozart-analytics/grails-docker/master/Dockerfile
4+
5+
# Set customizable env vars defaults.
6+
ENV GRAILS_VERSION 2.2.5
7+
8+
# Set phusion/baseimage's correct settings.
9+
ENV HOME /root
10+
11+
# Disable phusion/baseimage's ssh server (not necessary for this type of container).
12+
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
13+
14+
# Download Install Java
15+
RUN apt-get update
16+
RUN apt-get install -y openjdk-7-jdk unzip wget
17+
18+
# Setup Java Paths
19+
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
20+
ENV PATH $JAVA_HOME/bin:$PATH
21+
22+
# Install Grails
23+
WORKDIR /usr/lib/jvm
24+
RUN wget http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-$GRAILS_VERSION.zip
25+
RUN unzip grails-$GRAILS_VERSION.zip
26+
RUN rm -rf grails-$GRAILS_VERSION.zip
27+
RUN ln -s grails-$GRAILS_VERSION grails
28+
29+
# Setup Grails path.
30+
ENV GRAILS_HOME /usr/lib/jvm/grails
31+
ENV PATH $GRAILS_HOME/bin:$PATH
32+
33+
# Create App Directory
34+
WORKDIR /
35+
RUN mkdir /app
36+
COPY . /app
37+
RUN git pull --recurse-submodules
38+
WORKDIR /app
39+
40+
# Clean up APT.
41+
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
42+
43+
# Set Default Behavior
44+
# Use phusion/baseimage's init system.
45+
# See http://phusion.github.io/baseimage-docker/ for more info.
46+
ENTRYPOINT ["/sbin/my_init", "grails"]
47+
CMD ["prod", "run-war"]

0 commit comments

Comments
 (0)