Introduction :
For a few months I have been working on automating the deployment of web executables on docker containers hosted on AMAZON AWS, and I have added a hipchat notification to each deployment.
-->
This blog turns around Java technology (Java SE, Java EE, Java ME) and it's a pleasure for me to write my feedback of knowledge around this platform.
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"]
#!/bin/sh
${WILDFLY_HOME}/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
"Docker can build images automatically by reading the instructions from aDockerfile
. ADockerfile
is a text document that contains all the commands a user could call on the command line to assemble an image. Usingdocker build
users can create an automated build that executes several command-line instructions in succession."
# Comment INSTRUCTION arguments
FROM ImageName # directive=value
FROM image
FROM image:tag
FROM image@digest
ENV JAVA_HOME /dir_to_java
ADD "src"... "dest" ADD ["src",... "dest"] (this form is required for paths containing whitespace)
ADD test relativeDir/ # adds "test" to `WORKDIR`/relativeDir/ ADD test /absoluteDir/ # adds "test" to /absoluteDir/
COPY "src"... "dest COPY ["src",... "dest"] (this form is required for paths containing whitespace)
COPY test relativeDir/ # adds "test" to `WORKDIR`/relativeDir/ COPY test /absoluteDir/ # adds "test" to /absoluteDir/