How to use docker to run GlassFish Java EE application
Use the docker file:
Run GlassFish and Deploy your app (content of run.sh)
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
Post a Comment