Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial version of Dockerfile #56

Open
wants to merge 1 commit into
base: 2.6.0.Final
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
cordova
dist
tutorial
demo/target
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ _site
_tmp
classes
.forge_settings
jboss-eap-6.3.0.zip
55 changes: 55 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

112 changes: 112 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<!-- proxies
This is a list of proxies which can be used on this machine to connect to the network.
Unless otherwise specified (by system property or command-line switch), the first proxy
specification in this list marked as active will be used.If you are accessing network
via a proxy server, Un-comment the proxy options and fill in your proxy server detail.
-->
<proxies>
<!-- proxy
Specification for one proxy, to be used in connecting to the network.

<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>

<profiles>

<!-- Configure the JBoss GA Maven repository -->
<profile>
<id>jboss-ga-repository</id>
<repositories>
<repository>
<id>jboss-ga-repository</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-ga-plugin-repository</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<!-- Configure the JBoss Early Access Maven repository -->
<profile>
<id>jboss-earlyaccess-repository</id>
<repositories>
<repository>
<id>jboss-earlyaccess-repository</id>
<url>http://maven.repository.redhat.com/earlyaccess/all/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-earlyaccess-plugin-repository</id>
<url>http://maven.repository.redhat.com/earlyaccess/all/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>

</profiles>

<activeProfiles>
<!-- Optionally, make the repositories active by default -->
<activeProfile>jboss-ga-repository</activeProfile>
<activeProfile>jboss-earlyaccess-repository</activeProfile>
</activeProfiles>

</settings>