Skip to content

Instantly share code, notes, and snippets.

@ouyi
Last active December 18, 2017 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ouyi/041b3a5da038bcf24f1e6836ff5badf0 to your computer and use it in GitHub Desktop.
Save ouyi/041b3a5da038bcf24f1e6836ff5badf0 to your computer and use it in GitHub Desktop.
Glassfish commands
#!/usr/bin/env bash
# docker run -p 14848:4848 -p 18080:8080 -p 18181:8181 --name glassfish oracle/glassfish:5.0
##########GENERATED ADMIN PASSWORD: f621b788 ##########
# docker exec -u 0 -it glassfish bash
ADMIN_PASSWORD=123456
echo "AS_ADMIN_PASSWORD=${ADMIN_PASSWORD}" > /tmp/glassfishpwd
curl -o /tmp/hello.war -SL https://javaee.github.io/glassfish/downloads/quickstart/hello.war
jar tf /tmp/hello.war
asadmin -u admin -W /tmp/glassfishpwd deploy /tmp/hello.war
asadmin -u admin -W /tmp/glassfishpwd list-applications
curl -SL http://localhost:8080/hello
asadmin -u admin -W /root/glassfishpwd redeploy --name hello /tmp/hello.war
tail -80 /glassfish5/glassfish/domains/domain1/logs/server.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment