Dockerfile
# Base image
FROM jboss/wildfly:11.0.0.Final
# Create user admin with password admin3
RUN /opt/jboss/wildfly/bin/add-user.sh admin admin3 --silent
# Create module postgres
RUN mkdir -p /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main/
# JBoss ports
EXPOSE 8080 9990 8009 9797
# Run
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "-c", "standalone.xml", "--debug", "9797"]
-------------------------------
docker-compse.yml
version: '3.5'
services:
wildfly:
ports:
- "8080:8080"
- "9990:9990"
- "8009:8009"
- "9797:9797"
image: emontenegro/wildfly:latest
container_name: wildfly
environment:
- JAVA_OPTS=-server -Xms256m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
volumes:
- ./configuration:/opt/jboss/wildfly/standalone/configuration
- ./module/postgresql/main:/opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main/
networks:
- proxynet
networks:
proxynet:
name: em-net