Skip to content

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

Description

@ManuelB

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions