diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..5031816a9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +cordova +dist +tutorial +demo/target diff --git a/.gitignore b/.gitignore index 4046fc67e..c7d073971 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ _site _tmp classes .forge_settings +jboss-eap-6.3.0.zip \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..81dd1168c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,55 @@ +# Use latest jboss/base-jdk:7 image as the base +FROM jboss/base-jdk:7 + +MAINTAINER pmuir@bleepbleep.org.uk + +# Install Maven +USER root +RUN yum install -y maven +USER jboss + +# Set the EAP_VERSION env variable +ENV EAP_VERSION 6.3.0 +ENV EAP_MINOR_VERSION 6.3 + +# Add the EAP distribution to /opt, and make wildfly the owner of the extracted tar content +# Make sure the distribution is available from a well-known place +ADD ./jboss-eap-$EAP_VERSION.zip /opt/jboss/ +USER root +RUN chown jboss /opt/jboss/jboss-eap-$EAP_VERSION.zip +USER jboss +WORKDIR /opt/jboss +RUN unzip jboss-eap-$EAP_VERSION.zip && mv jboss-eap-$EAP_MINOR_VERSION jboss-eap && rm jboss-eap-$EAP_VERSION.zip + +# Set the JBOSS_HOME env variable +ENV JBOSS_HOME /opt/jboss/jboss-eap + +# Expose the ports we're interested in +EXPOSE 8080 9990 + +# Set up settings.xml with our recommendations +RUN mkdir -p /opt/jboss/.m2 +ADD ./settings.xml /opt/jboss/.m2/ + +# Build a copy of the maven repo +RUN mkdir -p /opt/jboss/ticket-monster +WORKDIR /opt/jboss/ticket-monster +ADD ./demo/pom.xml /opt/jboss/ticket-monster/ +RUN mvn -fn dependency:resolve dependency:resolve-plugins +ADD ./demo /opt/jboss/ticket-monster/ + +# Fix permissions on jboss-eap-quickstarts +USER root +RUN chown jboss /opt/jboss/ticket-monster +USER jboss + +# Build the quickstart +RUN mvn clean package + +# Copy the created war file to the #{product_name} deployments file, so that is deployed when #{product_name} starts +RUN cp target/ticket-monster.war /opt/jboss/jboss-eap/standalone/deployments/ + +# Set the default command to run on boot +# This will boot WildFly in the standalone mode and bind to all interface +CMD ["/opt/jboss/jboss-eap/bin/standalone.sh", "-b", "0.0.0.0"] + diff --git a/settings.xml b/settings.xml new file mode 100644 index 000000000..fe70bc9cd --- /dev/null +++ b/settings.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + jboss-ga-repository + + + jboss-ga-repository + http://maven.repository.redhat.com/techpreview/all + + true + + + false + + + + + + jboss-ga-plugin-repository + http://maven.repository.redhat.com/techpreview/all + + true + + + false + + + + + + + jboss-earlyaccess-repository + + + jboss-earlyaccess-repository + http://maven.repository.redhat.com/earlyaccess/all/ + + true + + + false + + + + + + jboss-earlyaccess-plugin-repository + http://maven.repository.redhat.com/earlyaccess/all/ + + true + + + false + + + + + + + + + + jboss-ga-repository + jboss-earlyaccess-repository + + +