Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added basic dockerfile for glassfish #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions glassfish/3.1.2.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM dockerfile/java

MAINTAINER martin.maher@consol.de

EXPOSE 8080
EXPOSE 8081
EXPOSE 4848
EXPOSE 8686

ENV GLASSFISH_VERSION 3.1.2.2
ENV DEPLOY_DIR /maven

RUN wget http://dlc.sun.com.edgesuite.net/glassfish/${GLASSFISH_VERSION}/release/glassfish-${GLASSFISH_VERSION}.zip -O /tmp/glassfish.zip

# Unpack
RUN unzip /tmp/glassfish.zip -d /opt
RUN ln -s /opt/glassfish3 /opt/glassfish
RUN rm /tmp/glassfish.zip

# Startup script
ADD deploy-and-run.sh /opt/glassfish/bin/

# Copy over custom domain.xml
# todo set custom java.security.egd property

# VOLUME ["/opt/tomcat/logs", "/opt/tomcat/work", "/opt/tomcat/temp", "/tmp/hsperfdata_root"

ENV GLASSFISH_HOME /opt/glassfish
ENV PATH $PATH:$GLASSFISH_HOME/bin

CMD /opt/glassfish/bin/deploy-and-run.sh
11 changes: 11 additions & 0 deletions glassfish/3.1.2.2/deploy-and-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
DIR=${DEPLOY_DIR:-/maven}
echo "Checking *.war in $DIR"
if [ -d $DIR ]; then
for i in $DIR/*.war; do
file=$(basename $i)
echo "Linking $i --> /opt/glassfish/glassfish/domains/domain1/autodeploy/$file"
ln -s $i /opt/glassfish/glassfish/domains/domain1/autodeploy/$file
done
fi
/opt/glassfish/bin/asadmin start-domain --verbose