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

GlassFish Image is back! #14107

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

dmatej
Copy link

@dmatej dmatej commented Feb 16, 2023

Many users (not just here) asked for the rescue of the official GlassFish Docker Image, and the time has come.

I don't have an experience with creating the official Docker Images, so please, if I am doing something incorrect, don't kill me ;-)

The repository: https://github.com/eclipse-ee4j/glassfish.docker
(note - the original OmniFish repo was donated to the Eclipse Foundation which is also the owner of Eclipse GlassFish)

Checklist for Review

NOTE: This checklist is intended for the use of the Official Images maintainers both to track the status of your PR and to help inform you and others of where we're at. As such, please leave the "checking" of items to the repository maintainers. If there is a point below for which you would like to provide additional information or note completion, please do so by commenting on the PR. Thanks! (and thanks for staying patient with us ❤️)

  • associated with or contacted upstream?
    GF: OK
  • available under an OSI-approved license?
    GF: OK, EPL2
  • does it fit into one of the common categories? ("service", "language stack", "base distribution")
    GF: OK, service, well known full Jakarta EE platform implementation.
  • is it reasonably popular, or does it solve a particular use case well?
    GF: OK, still popular after all, now growing community again.
  • does a documentation PR exist? (should be reviewed and merged at roughly the same time so that we don't have an empty image page on the Hub for very long).
    GF: OK, improving as we have feedback from users.
  • official-images maintainer dockerization review for best practices and cache gotchas/improvements (ala the official review guidelines)?
    OK, we followed this, dockerhub team recommendations, feedbacks and even advices from some tools.
  • 2+ official-images maintainer dockerization review?
    GF: TBD, we are still waiting for this. It will be 2 years soon.
  • existing official images have been considered as a base? (ie, if foobar needs Node.js, has FROM node:... instead of grabbing node via other means been considered?)
    GF: OK, we use Eclipse Temurin JDK as a base.
  • if FROM scratch, tarballs only exist in a single commit within the associated history?
    GF: OK, not from scratch.
  • passes current tests? any simple new tests that might be appropriate to add? (https://github.com/docker-library/official-images/tree/master/test)
    GF: OK, we added start+stop test, other options are tested in our repo.

@github-actions

This comment has been minimized.

@dmatej dmatej force-pushed the glassfish-is-back branch 2 times, most recently from 69021e5 to 7ee899a Compare February 18, 2023 16:48
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@dmatej
Copy link
Author

dmatej commented Feb 20, 2023

Is there some example how to work with default passwords in Dockerfiles constructed for this repository?

@github-actions

This comment has been minimized.

@dmatej dmatej marked this pull request as ready for review February 21, 2023 15:30
@dmatej
Copy link
Author

dmatej commented Feb 23, 2023

@tianon Could you please approve the latest to run those tests again? Is something else yet missing/incorrect except the documentation?
EDIT: Aha, yet the execution time. How can I stop the server in these tests?

https://github.com/docker-library/official-images/actions/workflows/test-pr.yml?query=event%3Apull_request+branch%3Aglassfish-is-back++

@github-actions

This comment has been minimized.

@dmatej
Copy link
Author

dmatej commented Feb 23, 2023

Ok, now it should pass all tests, at least I hope so.

  • removed sys user password
  • updated run-glassfish script, so now it is possible to replace the asadmin command with another. I did not like it, but after I did it I see it is now much easier to use it :-)
  • added one more test, just starts the server and check logs for a known message. Maybe later we can find something more complicated, however it doesn't make sense to test deployments etc, which are already tested in some 40000 tests by the glassfish project.

Note: Tini and similar tools don't work with GF, because of the asadmin implementation. But trap running the stop-domain command works well. There are some details I have to document yet (like stop-domain and docker stop timeouts).

@github-actions

This comment has been minimized.

@grooverdan
Copy link
Contributor

entrypoint:

exec "$@" for the non-asadmin case so the container returns the exit code of the command.

Can GlassFish be explicitly started in the foreground? While some protection with trapping EXIT has been done, there's a wider range of signals to trap. Its usually better if this can be handled by the main process.

On passwords, databases official image generally have a volume in which the server verification of passwords is stored and the entrypoints either:

  • general random password, output in log in parse-able format (e.g. mariadb)
  • env variable to set password on first run
  • env variable to allow no-auth

Which recording the password in a persistent volume, after which the password is set.

Convention on other docker official images is:

COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]

Official images generally are allowed to be run under any docker run --user rather than fixing it to 1000.

To improve maintainability of Dockerfile/entrypoint other repos e.g. redis:

  • Dockerfile.template at top directory, same with entrypoint.
  • update.sh script to populate version directories
  • generate-stackbrew.sh to create library/glassfish

disclaimer: I just a mariadb maintainer with no glassfish/j2ee experience

@github-actions

This comment has been minimized.

@dmatej
Copy link
Author

dmatej commented Feb 24, 2023

exec "$@" for the non-asadmin case so the container returns the exit code of the command.

Fixed, thanks for the review!

Can GlassFish be explicitly started in the foreground

It is some kind of a compromise. I have spent nearly a week until I reached at least this point. The asadmin is a shell script provided by GF used to work with the GF server. Then asadmin start-domain starts JVM using exec, which loads the domain.xml and other files and starts another JVM (and sets even different bootstrap classpath); with --verbose it inherits IO streams and uses them for logging.
The problem is that it doesn't process signals in combination with docker. I tried to use tiny, other scripts, and finally went with this solution, because it doesn't use any tricks with limited results and side effects, but does the most important thing - nicely stops the instance when I use docker stop, or kills the instance when I use docker kill.

I am trying to figure out some future changes in this behavior not just because of docker, but first we need to cleanup other things, make them more reliable, less fragile, clean. Since GF7 is possible to see startup+shutdown in logs, this helped me much to understand all those "traps" along the path.

Perhaps I missed something, but then I need a help with this. For sure I will probably write more tests to prevent wrong paths I already visited ...

On passwords, databases official image

I have already removed the original password of the user account, so the only password is for the GF admin. The context ...

  • HTTPS in GlassFish makes password mandatory (and one admin user at least)
  • For simplicity there is AS_ADMIN_PASSWORD ARG for the first run.
  • User can later use asadmin commands to create more accounts and passwords, delete them, change them.
  • These passwords are used for the remote access.
  • It is also possible to change their storage ie. to the database, but usually nobody does that for admin accounts
  • I agree that your solution is much safer, but not much user friendly for people who want to use the image for experiments and tests (user would have to set explicit password). Maybe we will discuss it yet.

Convention on other docker official images ... /usr/local/bin/ ... docker-entrypoint.sh

Fixed

run under any docker run --user rather than fixing it to 1000.

Here I am not sure.

Dockerfile.template

Yeah, I know, but I am lazy to write these scripts now. That's also why I started with two versions of GF, I am learning how much I have to change for each version, which results in some routine. I don't plan to do that manually for 10 versions later, on the other hand - I hate unreliable scripts doing just half of the work. This part yet waits for me, probably after the merge or when I will have to add the third version soon.

Btw, MariaDb scripts look really nice and clean, thank you!

@dmatej
Copy link
Author

dmatej commented Feb 28, 2023

Locally executed tests:

./run.sh glassfish
testing glassfish
'utc' [1/4]...passed
'no-hard-coded-passwords' [2/4]...passed
'override-cmd' [3/4]...passed
'glassfish' [4/4]...passed

@arturotena
Copy link

arturotena commented Mar 30, 2023

It seems that the domain name repo.maven.org is preferred over repo1.maven.org now?

https://issues.apache.org/jira/browse/MNG-5151

https://stackoverflow.com/a/36156652

Edit: sorry if this comment is not the right way to point this, I'm learning the github culture :)

@chabala
Copy link

chabala commented Mar 30, 2023

It seems that the domain name repo.maven.org is preferred over repo1.maven.org now?

$ ping repo.maven.org
ping: repo.maven.org: Name or service not known

No, that host doesn't exist. repo1.maven.org is fine. https://support.sonatype.com/hc/en-us/articles/360041287334

@dmatej dmatej marked this pull request as draft March 31, 2023 07:49
@dmatej dmatej marked this pull request as ready for review March 31, 2023 20:09
@github-actions

This comment has been minimized.

@arjantijms
Copy link

@yosifkit wdyt? Can this be merged now?

@arjantijms
Copy link

@tianon Is there anything else we need to do here?

This comment has been minimized.

@OndroMih
Copy link

Hi @tianon, as you requested, we've removed the older versions of GlassFish images that don't support the proper starting behavior. Can you please review again and let us know if there's still something to improve?

This comment has been minimized.

@arjantijms
Copy link

@tianon @yosifkit Anything we can do here still? Can you do a review?

This comment has been minimized.

@dmatej
Copy link
Author

dmatej commented Aug 4, 2024

Hi, @tianon and @yosifkit , the original OmniFish git repo was donated to the Eclipse Foundation which is also the owner of Eclipse GlassFish. Can we move on now?

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- Refreshed all as we are still in a PR stage

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- tested manually on AWS by OmniFish

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- not sure why as build did not produce useful logs, but my hypothesis is that
  it could be caused by the issue with domain restarts fixed in 7.0.1.

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- The original repository was donated to the Eclipse Foundation which also
  owns rights to the Eclipse GlassFish.

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Copy link

github-actions bot commented Nov 2, 2024

Diff for b12b1f5:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
-
+amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..63373dd 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,52 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: David Matejcek <david.matejcek@omnifish.ee> (@dmatej), Arjan Tijms <arjan.tijms@omnifish.ee> (@arjantijms), Ondro Mihalyi <ondro.mihalyi@omnifish.ee> (@ondromih)
+GitRepo: https://github.com/eclipse-ee4j/glassfish.docker.git
+GitFetch: refs/heads/main
+GitCommit: 4507192e8332614e653d9a0394eb5c94955c1bfe
+
+Tags: 7.0.8, 7.0.8-jdk17, 7.0.8-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.8
+
+Tags: 7.0.9, 7.0.9-jdk17, 7.0.9-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.9
+
+Tags: 7.0.10, 7.0.10-jdk17, 7.0.10-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.10
+
+Tags: 7.0.11, 7.0.11-jdk17, 7.0.11-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.11
+
+Tags: 7.0.12, 7.0.12-jdk17, 7.0.12-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.12
+
+Tags: 7.0.13, 7.0.13-jdk17, 7.0.13-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.13
+
+Tags: 7.0.14, 7.0.14-jdk17, 7.0.14-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.14
+
+Tags: 7.0.15, 7.0.15-jdk17, 7.0.15-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.15
+
+Tags: 7.0.16, 7.0.16-jdk17, 7.0.16-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.16
+
+Tags: 7.0.17, 7.0.17-jdk17, 7.0.17-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.17
+
+Tags: 7.0.18, 7.0.18-jdk17, 7.0.18-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.18
+
+Tags: latest, 7.0.19, 7.0.19-jdk17, 7.0.19-jdk17-eclipse-temurin
+Architectures: amd64, arm64v8
+Directory: 7.0.19
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..b107e94 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,37 @@
+glassfish:7.0.8
+glassfish:7.0.8-jdk17
+glassfish:7.0.8-jdk17-eclipse-temurin
+glassfish:7.0.9
+glassfish:7.0.9-jdk17
+glassfish:7.0.9-jdk17-eclipse-temurin
+glassfish:7.0.10
+glassfish:7.0.10-jdk17
+glassfish:7.0.10-jdk17-eclipse-temurin
+glassfish:7.0.11
+glassfish:7.0.11-jdk17
+glassfish:7.0.11-jdk17-eclipse-temurin
+glassfish:7.0.12
+glassfish:7.0.12-jdk17
+glassfish:7.0.12-jdk17-eclipse-temurin
+glassfish:7.0.13
+glassfish:7.0.13-jdk17
+glassfish:7.0.13-jdk17-eclipse-temurin
+glassfish:7.0.14
+glassfish:7.0.14-jdk17
+glassfish:7.0.14-jdk17-eclipse-temurin
+glassfish:7.0.15
+glassfish:7.0.15-jdk17
+glassfish:7.0.15-jdk17-eclipse-temurin
+glassfish:7.0.16
+glassfish:7.0.16-jdk17
+glassfish:7.0.16-jdk17-eclipse-temurin
+glassfish:7.0.17
+glassfish:7.0.17-jdk17
+glassfish:7.0.17-jdk17-eclipse-temurin
+glassfish:7.0.18
+glassfish:7.0.18-jdk17
+glassfish:7.0.18-jdk17-eclipse-temurin
+glassfish:7.0.19
+glassfish:7.0.19-jdk17
+glassfish:7.0.19-jdk17-eclipse-temurin
+glassfish:latest
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index e69de29..916eba8 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -0,0 +1,12 @@
+glassfish:7.0.8-jdk17-eclipse-temurin
+glassfish:7.0.9-jdk17-eclipse-temurin
+glassfish:7.0.10-jdk17-eclipse-temurin
+glassfish:7.0.11-jdk17-eclipse-temurin
+glassfish:7.0.12-jdk17-eclipse-temurin
+glassfish:7.0.13-jdk17-eclipse-temurin
+glassfish:7.0.14-jdk17-eclipse-temurin
+glassfish:7.0.15-jdk17-eclipse-temurin
+glassfish:7.0.16-jdk17-eclipse-temurin
+glassfish:7.0.17-jdk17-eclipse-temurin
+glassfish:7.0.18-jdk17-eclipse-temurin
+glassfish:7.0.19-jdk17-eclipse-temurin
diff --git a/glassfish_7.0.10-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.10-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..0c1164e
--- /dev/null
+++ b/glassfish_7.0.10-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,69 @@
+FROM eclipse-temurin:17.0.8.1_1-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.10 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.10-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.10-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.10-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.11-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.11-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..fd92d21
--- /dev/null
+++ b/glassfish_7.0.11-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,69 @@
+FROM eclipse-temurin:17.0.9_9-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.11 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.11-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.11-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.11-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.12-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.12-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..ec0deba
--- /dev/null
+++ b/glassfish_7.0.12-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,70 @@
+FROM eclipse-temurin:17.0.10_7-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.12 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.12-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.12-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.12-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.13-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.13-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..4abdbf5
--- /dev/null
+++ b/glassfish_7.0.13-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,70 @@
+FROM eclipse-temurin:17.0.10_7-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.13 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.13-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.13-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.13-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.14-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.14-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..837b00a
--- /dev/null
+++ b/glassfish_7.0.14-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,70 @@
+FROM eclipse-temurin:17.0.10_7-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.14 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.14-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.14-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.14-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.15-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.15-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..be5b92c
--- /dev/null
+++ b/glassfish_7.0.15-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,70 @@
+FROM eclipse-temurin:17.0.11_9-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.15 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.15-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.15-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.15-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.16-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.16-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..1076b61
--- /dev/null
+++ b/glassfish_7.0.16-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,83 @@
+FROM eclipse-temurin:17.0.12_7-jdk
+
+LABEL org.opencontainers.image.base.name="eclipse-temurin:17.0.12_7-jdk"
+LABEL org.opencontainers.image.source="https://github.com/eclipse-ee4j/glassfish.docker"
+LABEL org.opencontainers.image.url="https://github.com/eclipse-ee4j/glassfish.docker/wiki"
+
+LABEL org.opencontainers.image.title="Eclipse GlassFish"
+LABEL org.opencontainers.image.description="The Official Eclipse GlassFish Docker Image"
+LABEL org.opencontainers.image.version="7.0.16"
+
+LABEL org.opencontainers.image.authors="glassfish-dev@eclipse.org"
+LABEL org.opencontainers.image.vendor="Eclipse Foundation"
+LABEL org.opencontainers.image.licenses="EPL-2.0"
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=7234da42be54311bbfeaf93cf749def23f3a1af322fc6e66bbee56204167252ba2d79a8ab55b7e91b74a1d5a11eb8c7d214c06a99eef968b7b56cdc8628d3839 \
+    GLASSFISH_VERSION=7.0.16 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && userdel -r ubuntu \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.16-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.16-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.16-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.17-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.17-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..22847d3
--- /dev/null
+++ b/glassfish_7.0.17-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,83 @@
+FROM eclipse-temurin:17.0.12_7-jdk
+
+LABEL org.opencontainers.image.base.name="eclipse-temurin:17.0.12_7-jdk"
+LABEL org.opencontainers.image.source="https://github.com/eclipse-ee4j/glassfish.docker"
+LABEL org.opencontainers.image.url="https://github.com/eclipse-ee4j/glassfish.docker/wiki"
+
+LABEL org.opencontainers.image.title="Eclipse GlassFish"
+LABEL org.opencontainers.image.description="The Official Eclipse GlassFish Docker Image"
+LABEL org.opencontainers.image.version="7.0.17"
+
+LABEL org.opencontainers.image.authors="glassfish-dev@eclipse.org"
+LABEL org.opencontainers.image.vendor="Eclipse Foundation"
+LABEL org.opencontainers.image.licenses="EPL-2.0"
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=24785d0a789ef79e98bcc95275df272bff2ce40b16d29bd9a8b07c898d24639a4441c9ebe59295d5350cc2529d9e695df171b98d2b17e0f78eb89517db4347bc \
+    GLASSFISH_VERSION=7.0.17 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && userdel -r ubuntu \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.17-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.17-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.17-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.18-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.18-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..2427201
--- /dev/null
+++ b/glassfish_7.0.18-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,85 @@
+FROM eclipse-temurin:17.0.12_7-jdk
+
+LABEL org.opencontainers.image.base.name="eclipse-temurin:17.0.12_7-jdk"
+LABEL org.opencontainers.image.source="https://github.com/eclipse-ee4j/glassfish.docker"
+LABEL org.opencontainers.image.url="https://github.com/eclipse-ee4j/glassfish.docker/wiki"
+
+LABEL org.opencontainers.image.title="Eclipse GlassFish"
+LABEL org.opencontainers.image.description="The Official Eclipse GlassFish Docker Image"
+LABEL org.opencontainers.image.version="7.0.18"
+
+LABEL org.opencontainers.image.authors="glassfish-dev@eclipse.org"
+LABEL org.opencontainers.image.vendor="Eclipse Foundation"
+LABEL org.opencontainers.image.licenses="EPL-2.0"
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=d3ea04ed6c354cb386fdefacfaf3491fa116df0ce9c9635c49088cb1637b68820131807f9806e6a14b36954da8dc66d4cf065454502ff34a4f4774cd3e713700 \
+    GLASSFISH_VERSION=7.0.18 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && userdel -r ubuntu \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && mkdir ${PATH_GF_HOME}/autodeploy \
+    && echo "Installation was successful."
+
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.18-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.18-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..6320ae7
--- /dev/null
+++ b/glassfish_7.0.18-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' -a "$1" != 'runembedded' ]; then
+    exec "$@"
+fi
+
+if [ "$1" == 'runembedded' ]; then
+  shift 1
+  if [[ "$SUSPEND" == true ]]
+    then 
+      JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=9009 $JVM_OPTS"
+  elif [[ "$DEBUG" == true ]]
+    then
+      JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009 $JVM_OPTS"
+  fi
+  exec java $JVM_OPTS -jar glassfish/lib/embedded/glassfish-embedded-static-shell.jar "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.19-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.19-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..b570d1f
--- /dev/null
+++ b/glassfish_7.0.19-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,85 @@
+FROM eclipse-temurin:17.0.13_11-jdk
+
+LABEL org.opencontainers.image.base.name="eclipse-temurin:17.0.13_11-jdk"
+LABEL org.opencontainers.image.source="https://github.com/eclipse-ee4j/glassfish.docker"
+LABEL org.opencontainers.image.url="https://github.com/eclipse-ee4j/glassfish.docker/wiki"
+
+LABEL org.opencontainers.image.title="Eclipse GlassFish"
+LABEL org.opencontainers.image.description="The Official Eclipse GlassFish Docker Image"
+LABEL org.opencontainers.image.version="7.0.19"
+
+LABEL org.opencontainers.image.authors="glassfish-dev@eclipse.org"
+LABEL org.opencontainers.image.vendor="Eclipse Foundation"
+LABEL org.opencontainers.image.licenses="EPL-2.0"
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=905c8a795ecf1178aea711e75353587ef66a8097f1e633ca55233c99bb46cecfeaf0f06eb4f9311452846b10715d8a4bd1d254ab6015bd89f92e0057c704c3ad \
+    GLASSFISH_VERSION=7.0.19 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt upgrade -y \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && userdel -r ubuntu \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && mkdir ${PATH_GF_HOME}/autodeploy \
+    && echo "Installation was successful."
+
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.19-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.19-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..6320ae7
--- /dev/null
+++ b/glassfish_7.0.19-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' -a "$1" != 'runembedded' ]; then
+    exec "$@"
+fi
+
+if [ "$1" == 'runembedded' ]; then
+  shift 1
+  if [[ "$SUSPEND" == true ]]
+    then 
+      JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=9009 $JVM_OPTS"
+  elif [[ "$DEBUG" == true ]]
+    then
+      JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009 $JVM_OPTS"
+  fi
+  exec java $JVM_OPTS -jar glassfish/lib/embedded/glassfish-embedded-static-shell.jar "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.8-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.8-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..f1406d8
--- /dev/null
+++ b/glassfish_7.0.8-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,69 @@
+FROM eclipse-temurin:17.0.8_7-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.8 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.8-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.8-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.8-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait
diff --git a/glassfish_7.0.9-jdk17-eclipse-temurin/Dockerfile b/glassfish_7.0.9-jdk17-eclipse-temurin/Dockerfile
new file mode 100644
index 0000000..448dc02
--- /dev/null
+++ b/glassfish_7.0.9-jdk17-eclipse-temurin/Dockerfile
@@ -0,0 +1,69 @@
+FROM eclipse-temurin:17.0.8.1_1-jdk
+
+EXPOSE 4848 9009 8080 8181 7676 8686 3700 3820 3920 6666
+
+# You should use own credentials and own files! These are just defaults.
+ARG AS_ADMIN_PASSWORD=admin \
+    PATH_GF_PASSWORD_FILE_FOR_CHANGE=/password-change.txt \
+    UID=1000 \
+    GID=1000
+ENV PATH_GF_HOME=/opt/glassfish7 \
+    AS_ADMIN_USER=admin \
+    AS_ADMIN_PASSWORDFILE=/password.txt
+ENV AS_USER=${AS_ADMIN_USER} \
+    AS_PASSWORD_FILE=${AS_ADMIN_PASSWORDFILE} \
+    AS_TRACE=false \
+    AS_TRACE_LOGGING=false \
+    AS_TRACE_BOOTSTRAP=false \
+    AS_STOP_TIMEOUT=9500 \
+    GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \
+    GLASSFISH_VERSION=7.0.9 \
+    PATH_GF_BIN=${PATH_GF_HOME}/bin \
+    PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log"
+ENV PATH="${PATH_GF_BIN}:${PATH}"
+
+COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+
+RUN true \
+    && set -x \
+    && apt update \
+    && apt install -y gpg unzip \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip.asc" -o glassfish.zip.asc \
+    && curl -fL "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/${GLASSFISH_VERSION}/glassfish-${GLASSFISH_VERSION}.zip" -o glassfish.zip \
+    && export GNUPGHOME="$(mktemp -d)" \
+    && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys D4A77129F00F736293BE5A51AFC18A2271EDDFE1 \
+    && gpg --batch --verify glassfish.zip.asc glassfish.zip \
+    && rm glassfish.zip.asc \
+    && echo "$GLASSFISH_DOWNLOAD_SHA512 glassfish.zip" | sha512sum --strict --check \
+    && mkdir -p "${PATH_GF_HOME}" \
+    && unzip -q glassfish.zip -d "${PATH_GF_HOME}/.." \
+    && rm glassfish.zip \
+    && groupadd -g ${GID} glassfish \
+    && useradd -r -l -u ${UID} -g ${GID} -d "${PATH_GF_HOME}" -s /bin/bash glassfish \
+    && echo "Generating password file at ${AS_PASSWORD_FILE} ..." \
+    && set +x \
+    && echo "AS_ADMIN_PASSWORD=${AS_ADMIN_PASSWORD}" > "${AS_PASSWORD_FILE}" \
+    && echo "AS_ADMIN_PASSWORD=" > "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "AS_ADMIN_NEWPASSWORD=${AS_ADMIN_PASSWORD}" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && echo "" >> "${PATH_GF_PASSWORD_FILE_FOR_CHANGE}" \
+    && unset AS_ADMIN_PASSWORD \
+    && set -x \
+    && env | sort \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin --passwordfile ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} change-admin-password \
+    && asadmin stop-domain --kill \
+    && AS_START_TIMEOUT=120000 asadmin start-domain \
+    && curl  -o /dev/null http://localhost:4848 \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.GlassFishLogHandler.enabled=false \
+    && asadmin set-log-attributes org.glassfish.main.jul.handler.SimpleLogHandler.level=FINEST \
+    && asadmin enable-secure-admin \
+    && asadmin stop-domain --kill \
+    && rm -f ${PATH_GF_SERVER_LOG} ${PATH_GF_PASSWORD_FILE_FOR_CHANGE} \
+    && chown -R glassfish:glassfish "${PATH_GF_HOME}" \
+    && chmod +x /usr/local/bin/docker-entrypoint.sh \
+    && echo "Installation was successful."
+USER glassfish
+WORKDIR ${PATH_GF_HOME}
+ENTRYPOINT ["docker-entrypoint.sh"]
+CMD ["startserv"]
diff --git a/glassfish_7.0.9-jdk17-eclipse-temurin/docker-entrypoint.sh b/glassfish_7.0.9-jdk17-eclipse-temurin/docker-entrypoint.sh
new file mode 100755
index 0000000..a2c4cc1
--- /dev/null
+++ b/glassfish_7.0.9-jdk17-eclipse-temurin/docker-entrypoint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e;
+
+if [ "$1" != 'asadmin' -a "$1" != 'startserv' ]; then
+    exec "$@"
+fi
+
+CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
+if [ ! -f "$CONTAINER_ALREADY_STARTED" ]
+then
+    touch "$CONTAINER_ALREADY_STARTED" &&
+    rm -rf glassfish/domains/domain1/autodeploy/.autodeploystatus || true
+fi
+
+if [ "$1" == 'startserv' ]; then
+  exec "$@"
+fi
+
+on_exit () {
+    EXIT_CODE=$?
+    set +e;
+    ps -lAf;
+    asadmin stop-domain --force --kill;
+    exit $EXIT_CODE;
+}
+trap on_exit EXIT
+
+env|sort && "$@" & wait

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

Successfully merging this pull request may close these issues.

7 participants