Skip to content
Ondro Mihályi edited this page Jan 28, 2026 · 17 revisions

Eclipse Glassfish Docker Images

The Docker images are available at the following coordinates:

  • GlassFish Server Full Profile: ghcr.io/eclipse-ee4j/glassfish
  • Embedded GlassFish All: ghcr.io/eclipse-ee4j/embedded-glassfish

More info about the images in the container registry:

Images are available for the amd64 and arm64 architectures.

How to Use Eclipse GlassFish Docker Images?

Start GlassFish Server in Docker

docker run -p 8080:8080 -p 4848:4848 ghcr.io/eclipse-ee4j/glassfish

Deploy an application at startup:

docker run -p 8080:8080 -p 4848:4848 -v /path/to/application.war:/deploy/application.war ghcr.io/eclipse-ee4j/glassfish
  • /path/to/application.war is local path to the application
  • /deploy/application.war is the path in the container

Open the following URLs in the browser:

For more info about using GlassFish Server in the Docker image, see Using GlassFish Server with the docker Command

Start Embedded GlassFish in Docker

To run an application in /applications/myapp.war with Embedded GlassFish:

docker run -p 8080:8080 -v /applications/myapp.war:/deploy/myapp.war ghcr.io/eclipse-ee4j/glassfish runembedded apps/myapp.war

Or to deploy all applications in the /applications directory:

docker run -p 8080:8080 -v /applications:/deploy ghcr.io/eclipse-ee4j/embedded-glassfish

NOTE: Before 7.1.0, Embedded GlassFish used to be started using the GlassFish Server Docker image, using the runembedded argument. This is not supported anymore, the separate Embedded GlassFish Docker image should be used instead.

For more info about using Embedded GlassFish in the Docker image, see Using Embedded GlassFish with the docker Command

To deploy an app on GlassFish Server using the Test Containers framework

new GenericContainer<>("ghcr.io/eclipse-ee4j/glassfish:latest")
            .withExposedPorts(8080, 4848)
            .withCopyFileToContainer(MountableFile.forHostPath(applicationPath),
                "/deploy/" + APP_FILENAME)
            .waitingFor(
                Wait.forLogMessage(".*Successfully autodeployed.*", 1)
                    .withStartupTimeout(Duration.ofSeconds(10L)))
            ;

Further information on using GlassFish in Docker

Jakarta EE resources

Where to Get Help?

What About GlassFish 6?

Eclipse GlassFish 6 contains many changes, however some of important start/stop issues were fixed with redesign and refactoring done for Eclipse GlassFish 7. Simply said, 6 is not ready for Docker.

Why Folder Per Version?

Repository contains copy-pastes. The reason is that Docker Hub Container Image Library uses just and only Dockerfiles from this repository, but before we push them out, we already have to know that they are correct and we have to commit them. DockerHub then links its distribution image to the commit id in this repository.

License

See https://www.eclipse.org/legal/epl-2.0/