Digital Marketing

How to use docker to run GlassFish Java EE application

Use the docker file:
FROM glassfish:latest
MAINTAINER goyun.info"

COPY your.ear /
COPY run.sh /

EXPOSE 8080

ENTRYPOINT ["/run.sh"]

Run GlassFish and Deploy your app (content of run.sh)
#!/bin/sh

/opt/glassfish4/bin/asadmin start-domain
/opt/glassfish4/bin/asadmin -u admin deploy /your.ear
/opt/glassfish4/bin/asadmin stop-domain
/opt/glassfish4/bin/asadmin start-domain --verbose
# or to avoid restart GlassFish
#tail -F /path/to/your/domain/logs/server.log

Comments

Popular posts from this blog

Make online money from the Internet