Skip to content
Permalink
Browse files

Setup Phusion and Alpine + Java 8 Glassfish

  • Loading branch information...
koert committed Apr 7, 2016
1 parent 1f3e866 commit 3c4afed53cccc7ddf0e69a4a0efd2adf669beeb2
Showing with 48 additions and 9 deletions.
  1. +16 −9 Dockerfile
  2. +32 −0 Dockerfile-alpine
@@ -1,32 +1,39 @@
FROM frolvlad/alpine-oraclejdk8
FROM ubuntu-oracle-jdk8
MAINTAINER Koert Zeilstra <koert.zeilstra@zencode.nl>

# Build image
# docker build -t koert/glassfish-4.1 .

RUN apk add --update bash expect && rm -rf /var/cache/apk/* && \
mkdir -p /opt/app/bin && mkdir -p /opt/app/deploy && \
RUN apt-get update && \
apt-get install -y wget unzip pwgen expect && \
wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip && \
unzip glassfish-4.1.zip -d /opt && \
rm glassfish-4.1.zip


RUN echo 'root:root' | chpasswd

ENV PATH /opt/glassfish4/bin:/opt/app/bin:$PATH

RUN mkdir -p /opt/app/bin
RUN mkdir -p /opt/app/deploy

ADD bin/change_admin_password.sh /opt/app/bin/change_admin_password.sh
ADD bin/change_admin_password_func.sh /opt/app/bin/change_admin_password_func.sh
ADD bin/enable_secure_admin.sh /opt/app/bin/enable_secure_admin.sh
ADD bin/initialize-glassfish.sh /opt/app/bin/initialize-glassfish.sh
ADD bin/configure-glassfish.sh /opt/app/bin/configure-glassfish.sh
ADD bin/start-glassfish.sh /opt/app/bin/start-glassfish.sh

RUN chmod +x /opt/app/bin/*.sh

RUN /opt/app/bin/initialize-glassfish.sh

RUN echo 'root:root' | chpasswd

RUN mkdir /etc/service/glassfish
ADD bin/start-glassfish.sh /etc/service/glassfish/run
RUN chmod +x /etc/service/glassfish/run

RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# 4848 (administration), 8080 (HTTP listener), 8181 (HTTPS listener), 9009 (JPDA debug port)
EXPOSE 4848 8080 8181 9009

CMD ["/opt/app/bin/start-glassfish.sh"]
# CMD ["/opt/app/bin/start-glassfish.sh"]

@@ -0,0 +1,32 @@
FROM frolvlad/alpine-oraclejdk8
MAINTAINER Koert Zeilstra <koert.zeilstra@zencode.nl>

# Build image
# docker build -t koert/glassfish-4.1 .

RUN apk add --update bash expect && rm -rf /var/cache/apk/* && \
mkdir -p /opt/app/bin && mkdir -p /opt/app/deploy && \
wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip && \
unzip glassfish-4.1.zip -d /opt && \
rm glassfish-4.1.zip


RUN echo 'root:root' | chpasswd

ENV PATH /opt/glassfish4/bin:/opt/app/bin:$PATH

ADD bin/change_admin_password.sh /opt/app/bin/change_admin_password.sh
ADD bin/change_admin_password_func.sh /opt/app/bin/change_admin_password_func.sh
ADD bin/enable_secure_admin.sh /opt/app/bin/enable_secure_admin.sh
ADD bin/initialize-glassfish.sh /opt/app/bin/initialize-glassfish.sh
ADD bin/configure-glassfish.sh /opt/app/bin/configure-glassfish.sh
ADD bin/start-glassfish.sh /opt/app/bin/start-glassfish.sh

RUN chmod +x /opt/app/bin/*.sh
RUN /opt/app/bin/initialize-glassfish.sh

# 4848 (administration), 8080 (HTTP listener), 8181 (HTTPS listener), 9009 (JPDA debug port)
EXPOSE 4848 8080 8181 9009

CMD ["/opt/app/bin/start-glassfish.sh"]

0 comments on commit 3c4afed

Please sign in to comment.
You can’t perform that action at this time.