mercredi 21 décembre 2016

Install Wildfly with Docker

Introduction :

Recently, for a mission to a client, my team and I had developed a backoffice application to expose web services REST. We used the Java EE 7 standard. Among several application servers we chose Wildlfy 9. And so I was able to install this server for continuous integration.

Introduction :

As stated in my old article, the docker's heart is the Dockerfile file, so the first thing to do is to write this file.

FROM jboss/wildfly:9.0.2.Final
MAINTAINER Jalel HAZBRI "jalel.hazbri@gmail.com"

ENV WILDFLY_HOME /opt/jboss/wildfly

# Add console admin user
RUN ${WILDFLY_HOME}/bin/add-user.sh mjhazbri mjhazbri --silent

# Ports
EXPOSE 8080 9990

# Volumes
VOLUME ${WILDFLY_HOME}/standalone/deployments/
VOLUME ${WILDFLY_HOME}/standalone/log/

# RUN script
COPY start-wildfly.sh ${WILDFLY_HOME}/bin/start-wildfly.sh
USER root
RUN chmod +x ${WILDFLY_HOME}/bin/start-wildfly.sh
#USER jboss

ENTRYPOINT ["sh", "-c", "${WILDFLY_HOME}/bin/start-wildfly.sh"]

And the last line is to start wildfly with the script start-wildfly.sh :


${WILDFLY_HOME}/bin/standalone.sh -b -bmanagement

Aucun commentaire :

Enregistrer un commentaire