-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
base: master
Are you sure you want to change the base?
GlassFish Image is back! #14107
Conversation
69021e5
to
809471b
Compare
This comment has been minimized.
This comment has been minimized.
69021e5
to
7ee899a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Is there some example how to work with default passwords in Dockerfiles constructed for this repository? |
7ee899a
to
4afd28d
Compare
This comment has been minimized.
This comment has been minimized.
@tianon Could you please approve the latest to run those tests again? Is something else yet missing/incorrect except the documentation? |
This comment has been minimized.
This comment has been minimized.
Ok, now it should pass all tests, at least I hope so.
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). |
5b925c8
to
8034003
Compare
This comment has been minimized.
This comment has been minimized.
entrypoint:
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:
Which recording the password in a persistent volume, after which the password is set. Convention on other docker official images is:
Official images generally are allowed to be run under any To improve maintainability of Dockerfile/entrypoint other repos e.g. redis:
disclaimer: I just a mariadb maintainer with no glassfish/j2ee experience |
This comment has been minimized.
This comment has been minimized.
Fixed, thanks for the review!
It is some kind of a compromise. I have spent nearly a week until I reached at least this point. The 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 ...
I have already removed the original password of the user account, so the only password is for the GF admin. The context ...
Fixed
Here I am not sure.
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! |
Locally executed tests:
|
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 :) |
$ ping repo.maven.org
ping: repo.maven.org: Name or service not known No, that host doesn't exist. |
271b251
to
b87f581
Compare
This comment has been minimized.
This comment has been minimized.
@yosifkit wdyt? Can this be merged now? |
@tianon Is there anything else we need to do here? |
This comment has been minimized.
This comment has been minimized.
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? |
0d0742c
to
de2a671
Compare
This comment has been minimized.
This comment has been minimized.
de2a671
to
a92d217
Compare
This comment has been minimized.
This comment has been minimized.
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>
a92d217
to
b12b1f5
Compare
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 |
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 ❤️)
GF: OK
GF: OK, EPL2
GF: OK, service, well known full Jakarta EE platform implementation.
GF: OK, still popular after all, now growing community again.
GF: OK, improving as we have feedback from users.
OK, we followed this, dockerhub team recommendations, feedbacks and even advices from some tools.
GF: TBD, we are still waiting for this. It will be 2 years soon.
foobar
needs Node.js, hasFROM node:...
instead of grabbingnode
via other means been considered?)GF: OK, we use Eclipse Temurin JDK as a base.
FROM scratch
, tarballs only exist in a single commit within the associated history?GF: OK, not from scratch.
GF: OK, we added start+stop test, other options are tested in our repo.