Sign inSign up

mosaicgreifswald/wildfly

By mosaicgreifswald

Updated about 8 hours ago

this wildfly-image provides the simple start of deployments without the need to build your own image

Image
Web servers
2

1M+

mosaicgreifswald/wildfly repository overview

General

The WildFly image has the most use cases for us. It can be used directly with Docker Compose, or serves as the basis for other images itself. This image can be started directly without building your own image first. Of course, you can still build your own image.

About Health-Check-Strategies

There are 3 strategies built into this docker image.

  • Microprofile-Health
    This is the default strategy and only works if the WF_ADMIN_PASS variable is set. Then the WildFly management automatically checks all deployments that have the microprofile installed (see https://microprofile.io/specifications/microprofile-health/).
  • URL-check
    For this strategy at least one accessible URL must be specified as ENV-variable WF_HEALTHCHECK_URLS. If a URL is not reachable or does not return the HTTP status code 200, the health status is set to "unhealthy". This strategy can be combined with Microprofile-Health.
  • Running-Deployments
    This solution only works if neither of the other two strategies is used. It only checks that none of the deployments has booted incorrectly.

Relevant ENV Variables

CategoryVariableAvailable values or schemeDefaultPurpose
WF-AdminWF_NO_ADMINtrue | falsefalseset true if you don't need wildfly-admin
WF-AdminWF_ADMIN_USER<STRING>admindefine username for wildfly-admin
WF-AdminWF_ADMIN_PASS<STRING>-random-to set password for wildfly-admin
QualityWF_HEALTHCHECK_URLS<NEWLINE-SEPARATED-URLs>-contain a list of urls to check the health of this container
OptimizingTZ<STRING>Europe/Berlintimezone
OptimizingWF_ADD_CLI_FILTER<PIPE-SEPARATED-STRING>-define additional pipe-separated file-extensions that jboss-cli should process
OptimizingWF_MARKERFILEStrue | false | autoautothese affect the creation of marker-files (.isdeploying or .deployed) in the deployment-directory
OptimizingWF_MAX_POST_SIZE<BYTES>10485760the maximum size of a post that will be accepted, in bytes
OptimizingWF_MAX_PARAMETERS<NUMBER>100000the maximum number of parameters that will be parsed
OptimizingWF_MAX_CHILD_ELEMENTS<NUMBER>50000the maximum number of children that will be allow in xml-post
OptimizingWF_BLOCKING_TIMEOUT<SECONDS>300this can be used to change the time until processes are cancelled
OptimizingWF_TRANSACTION_TIMEOUT<SECONDS>300this can be used to change the time after which a transaction is automatically terminated
OptimizingWF_DATASOURCES_QUERY_TIMEOUT new<SECONDS>30timeout for datasource queries
OptimizingWF_DEPLOYMENT_TIMEOUT new<SECONDS>600timeout for the deployment scanner to allow a deployment attempt before being canceled
OptimizingWF_ENABLE_HTTP2true | falsefalseHTTP2 support
OptimizingWF_ENABLE_PROXY_ADDRESS_FORWARDING newtrue | falsefalseuse this option when the wildfly is running behind a reverse proxy or load balancer (e.g., NGINX, Apache, etc.).
OptimizingJAVA_OPTS<STRING>-Xms1G -Xmx6G ...you need more memory? then give yourself more memory or define any system-variables
ProcessingMOS_WAIT_FOR_PORTS<HOST>:<PORT>[:<TIMEOUT>[:<SLEEP>]],...-comma- or semicolon-separated list of endpoints that should wait before starting wildfly. defaults timeout=300,sleep=0
ProcessingWF_WAIT_FOR_PORTS<HOST>:<PORT>[:<TIMEOUT>[:<SLEEP>]],...-just like MOS_WAIT_FOR_PORTS, but waits after JBoss-CLI
SecurityWF_SERVER_KEYSTORE_PASSWORD<STRING>-this password is only used in combination with /entrypoint-wildfly-server-keystore to access the keystore
SecurityWF_SERVER_KEYSTORE_ALIAS<STRING>-if there is more than one certificate in the keystore, this alias must be specified
LoggingWF_SYSTEM_LOG_LEVEL improvedSEVERE|FATAL|ERROR|WARN|INFO|DEBUG|TRACE|FINEINFOthis can be used to set the log level of the console
LoggingWF_SYSTEM_LOG_COLORS new<LEVEL>:<COLOR>[,<LEVEL>:<COLOR>[,...]]-this map allows a comma delimited list of colors to be used for different levels with a pattern formatter
LoggingWF_SYSTEM_LOG_TO improvedCONSOLE;FILE;SYSLOGCONSOLEmultiple values semicolon-separated possible
LoggingWF_SYSTEM_SYSLOG_HOST new<HOST>syslogvalue will be taken from WF_SYSLOG_HOST if not set
LoggingWF_SYSTEM_SYSLOG_PORT new<PORT>514value will be taken from WF_SYSLOG_PORT if not set
LoggingWF_SYSTEM_SYSLOG_FORMAT newRFC3164 | RFC5424RFC3164value will be taken from WF_SYSLOG_FORMAT if not set
DebuggingWF_DEBUGtrue | falsefalseset true to enable debug-mode in wildfly
DebuggingDEBUG_PORT<IP>:<PORT>*:8787for debugging you can change the ip:port
# more with "envs"
> docker run --rm mosaicgreifswald/wildfly envs

Relevant Entrypoints

Pathref. ENV-VariableTypePurpose
/entrypoint-logsENTRY_LOGSfolderall further layers can store their own log files here in subdirectories.
/entrypoint-help-and-usageENTRY_USAGEfolderHere you will find README-files for each docker-image-layer, including examples.
/entrypoint-java-cacertsENTRY_JAVA_CACERTSfilethe entrypoint can be used to store its own cacerts, e.g. containing public-keys of server certificates for specific web requests or CA.
/entrypoint-wildfly-cliENTRY_WILDFLY_CLIfolderto execute JBoss-cli-files before start WildFly (read-only access)
/entrypoint-wildfly-deploymentsENTRY_WILDFLY_DEPLOYSfolderto import your deployments, also ear- and/or war-files (read-only access, optional write access)
/entrypoint-wildfly-addinsENTRY_WILDFLY_ADDINSfolderto import additional files for deployments (read-only access)
/entrypoint-wildfly-logsENTRY_WILDFLY_LOGSfolderto export all available log-files (read/write access)
/entrypoint-wildfly-server-keystoreENTRY_WILDFLY_SERVER_KEYSTOREfileto use your own keystore for server certificate (read-only access)
# similar with "entrypoints"
> docker run --rm mosaicgreifswald/wildfly entrypoints

Usage

# build wildfly-image (required java-image mosaicgreifswald/zulujre:25)
> git clone https://github.com/mosaic-hgw/Docker.git
> cd mosaic-hgw/Docker/image/wildfly
> docker build --tag="mosaicgreifswald/wildfly" --file="Dockerfile.wildfly.40" .

# "versions" shows all installed tools and components, with their versions.
> docker run --rm mosaicgreifswald/wildfly versions
  last updated               : 2026-07-20 16:56:45
  Architecture               : x86_64
  Distribution               : Debian GNU/Linux 13.6 (trixie)
  zulu-jre                   : 25.0.3 
  WildFly                    : 40.0.1.Final
  MySQL-Connector            : 9.7.0
  MariaDB-Connector          : 3.5.9
  PostgreSQL-Connector       : 42.7.13
  EclipseLink                : 4.0.9

# simple start with your deployments and without wildfly-admin-user
> docker run --rm \
    -e WF_NO_ADMIN=true \
    -p 8080:8080 \
    -v /path/to/your/deployments:/entrypoint-wildfly-deployments \
    mosaicgreifswald/wildfly

# if your deployment folder is write-protected, you can explicitly switch off the markerfiles
> docker run --rm \
    -e WF_ADMIN_PASS=top-secret \
    -e WF_MARKERFILES=false \
    -e WF_HEALTHCHECK_URLS=http://localhost:8080\nhttp://localhost:8080/your-app.html \
    -p 8080:8080 \
    -p 9990:9990 \
    -v /path/to/your/cli-files:/entrypoint-wildfly-cli \
    -v /path/to/readonly/deployments:/entrypoint-wildfly-deployments \
    mosaicgreifswald/wildfly

Change write permissions

If data is stored on the host-system (via volume), it is created by default with the internal mosaic-user (UID:GID = 1111:1111). Accordingly, the writable directories on the host-system must be unlocked for the mosaic-user.

# at host-system
chown -R 1111:1111 deployments logs

Note: The deployment directory does not necessarily have to have write permissions. If these are omitted here, no WildFly marker-files are set.

The alternative, change write-user

You can change the write-user by using the Docker parameter --user/-u.

# change write-user (UID:GID) for writable volumes like logs/
> docker run --rm -d \
    -u 1006:1001 \
    -e WF_SYSTEM_LOG_TO=FILE \
    -v /path/to/your/logs:/entrypoint-wildfly-logs \
    mosaicgreifswald/wildfly

> ls -la /path/to/your/logs
insgesamt 8
drwxr-xr-x  2 1006 1001 4096 11. Jun 10:25 .
drwxrwxrwt 10 root root 4096 11. Jun 10:26 ..
-rw-r--r--  1 1006 1001    0 11. Jun 10:25 server.log
drwxr-xr-x  2 1006 1001 4096 11. Jun 10:25 system

Usage with docker compose

over docker-compose with dependent on mysql-db (example)

# docker-compose.yml

services:
  mysql:
    image: mysql
    environment:
      MYSQL_ROOT_PASSWORD: top-secret
    volumes:
      - /path/to/your/init-sql-files:/docker-entrypoint-initdb.d
  wildfly:
    image: mosaicgreifswald/wildfly
    ports:
      - 8080:8080
      - 9990:9990
    depends_on:
      - mysql
    environment:
      WF_ADMIN_PASS: top-secret
      WF_HEALTHCHECK_URLS: |
        http://localhost:8080
        http://localhost:8080/your-app.html
      WF_WAIT_FOR_PORTS: mysql:3306
    volumes:
      - /path/to/your/cli-files:/entrypoint-wildfly-cli
      - /path/to/your/deployments:/entrypoint-wildfly-deployments

What are JBoss-CLI-File?

CLI-files are text files that contain a list of CLI commands to execute on a JBoss-server. They are useful for scripting and batch processing tasks, such as deploying applications, configuring system settings, or performing administrative operations. In this way it is possible to use our WildFly-image without having to modify it for your own purposes. All relevant adjustments can be written into a CLI-file and passed to WildFly.

Examples for create JBoss-CLI-File
  • add mysql-datasource
    # add-mysql-datasource.cli
    
    data-source add \
      --name=MySQLPool \
      --jndi-name=java:/jboss/MySQLDS \
      --connection-url=jdbc:mysql://mysql:3306/dbName \
      --user-name=mosaic \
      --password=top-secret \
      --driver-name=mysql
    

Additional files

# explore all additional files
> docker run --rm -it mosaicgreifswald/wildfly examples

# explore and copy interesting files to your local host
> docker run --rm -itv "/your/local/path/:/tmp/" mosaicgreifswald/wildfly examples --target-dir /tmp

# or copy directly all files to your host
> docker run --rm -v "/your/local/path/:/tmp/" mosaicgreifswald/wildfly examples --copy-all --target-dir /tmp"

You will receive the following directory-tree and can start playing immediately:

├─┬─ layer-readme/
│ ├─── README-debian.md
│ ├─── README-wildfly.md
│ └─── README-zulujre.md
└─┬─ examples/
  ├─┬─ compose-wildfly-empty/
  │ ├─── addins/
  │ ├─── deployments/
  │ ├─┬─ envs/
  │ │ └─── wf_commons.env
  │ ├─── jboss/
  │ ├─── logs/
  │ ├─── sqls/
  │ └─── docker-compose.yml
  └─┬─ pure-envs/
    ├─── debian.env
    ├─── wf_commons.env
    └─── zulujre.env

Current Software-Versions on this Image

DateTagsChanges
2026-07-20


40-20260720, 40, latest (Dockerfile)


Debian 13.6 "trixie"
PostgreSQL-Connector 42.7.13
fixed schema definition in ajp listener
2026-06-23


40-20260623 (Dockerfile)


WildFly 40.0.1.Final
openJRE 25.0.3
MariaDB-Connector 3.5.9
2026-05-20




38-20260520, 38 (Dockerfile)




Debian 13.5 "trixie"
openJRE 21.0.11
MySQL-Connector 9.7.0
MariaDB-Connector 3.5.8
PostgreSQL-Connector 42.7.11
2026-03-0938-20260309 (Dockerfile)fixed cli reinitializing
2026-03-03


38-20260303 (Dockerfile)


WildFly 38.0.1.Final
MySQL-Connector 9.6.0
PostgreSQL-Connector 42.7.10
2026-01-26




38-20260126 (Dockerfile)




Debian 13.3 "trixie"
openJRE 21.0.10
MariaDB-Connector 3.5.7
PostgreSQL-Connector 42.7.9
EclipseLink 4.0.9
2025-12-1038-20251210Debian 13.2 "trixie"
2025-10-29






38-20251029 (Dockerfile)






Debian 13.1 "trixie"
openJRE 21.0.9
WildFly 38.0.0.Final
MySQL-Connector 9.5.0
MariaDB-Connector 3.5.6
PostgreSQL-Connector 42.7.8
EclipseLink 4.0.8
2025-07-2236-20250722, 36openJRE 21.0.8
2025-06-13


36-20250613 (Dockerfile)


Debian 12.11 "bookworm"
PostgreSQL-Connector 42.7.7
EclipseLink 4.0.7
2025-05-1636-20250516 (Dockerfile)WildFly 36.0.1.Final

Tag summary

Content type

Image

Digest

sha256:6a75a704a

Size

379.1 MB

Last updated

about 8 hours ago

docker pull mosaicgreifswald/wildfly