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 VARIABLES
ENV WILDFLY_HOME /opt/jboss/wildfly
ENV WILDFLY_VERSION 9.0.2.Final
# 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 :
#!/bin/sh
${WILDFLY_HOME}/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
Aucun commentaire :
Enregistrer un commentaire