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

It does not make a lot of sense to expose port 4848 of glassfish if secure admin is not enabled #20

Open
ManuelB opened this issue Nov 5, 2017 · 0 comments

Comments

@ManuelB
Copy link

ManuelB commented Nov 5, 2017

I just used your java ee 8 essential archetype from maven and it is awesome.

When I tried to access http://localhost:4848 the following was shown:

Error Configuration Error
Secure Admin must be enabled to access the DAS remotely.

image

After some googling I found:

https://github.com/glassfish/docker/blob/master/nightly/Dockerfile from @brunoborges

I adapted the archtetype Dockerfile:

FROM airhacks/glassfish
# Comment in these lines to set the password to changeme and the admin interface to SSL. This is required to access https://localhost:4848/
#RUN asadmin --user=admin stop-domain && \
#    echo "--- Setup the password file ---" && \
#    echo "AS_ADMIN_PASSWORD=" > /tmp/glassfishpwd && \
#    echo "AS_ADMIN_NEWPASSWORD=changeme" >> /tmp/glassfishpwd  && \
#    echo "--- Enable DAS, change admin password, and secure admin access ---" && \
#    asadmin --user=admin --passwordfile=/tmp/glassfishpwd change-admin-password && \
#    asadmin start-domain && \
#    echo "AS_ADMIN_PASSWORD=changeme" > /tmp/glassfishpwd && \
#    asadmin --user=admin --passwordfile=/tmp/glassfishpwd enable-secure-admin && \
#    asadmin --user=admin stop-domain && \
#    asadmin start-domain --verbose && \
#    rm /tmp/glassfishpwd
COPY ./target/mywarfile.war ${DEPLOYMENT_DIR}

It would be nice if this template can be added to your glassfish Dockerfile as well.

/Manuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant