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

Docker container for Wildfly 8.1.0-Final #2

Open
wants to merge 2 commits into
base: master
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
27 changes: 27 additions & 0 deletions wildfly/8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM dockerfile/java

MAINTAINER zb@consol.de olafr@consol.de

EXPOSE 8080

ENV WILDFLY_VERSION 8.1.0.Final
ENV DEPLOY_DIR /maven

RUN wget http://download.jboss.org/wildfly/${WILDFLY_VERSION}/wildfly-${WILDFLY_VERSION}.tar.gz -O /tmp/wildfly.tar.gz

# Unpack
RUN tar xzf /tmp/wildfly.tar.gz -C /opt
RUN ln -s /opt/wildfly-${WILDFLY_VERSION} /opt/wildfly
RUN rm /tmp/wildfly.tar.gz

# Add roles
ADD mgmt-groups.properties /opt/wildfly-${WILDFLY_VERSION}/standalone/configuration/
ADD mgmt-users.properties /opt/wildfly-${WILDFLY_VERSION}/standalone/configuration/

# Startup script
ADD deploy-and-run.sh /opt/wildfly-${WILDFLY_VERSION}/bin/

ENV WILDFLY_HOME /opt/wildfly
ENV PATH $PATH:$WILDFLY_HOME/bin

CMD /opt/wildfly-${WILDFLY_VERSION}/bin/deploy-and-run.sh
23 changes: 23 additions & 0 deletions wildfly/8.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## JBoss Wildfly 8.1.0-Final

A simple docker build for installing a vanilla Wildfly 8.1 below
*/opt/wildfly*. It comes out of the box and is intended for use for
integration testing.

During startup a directory /maven is checked for .war files. If there
are any, they are linked into Wildfly's standalone/deployments/ directory for automatic
deployment. This plays nicely with the Docker maven plugin from
https://github.com/rhuss/docker-maven-plugin/ and its 'assembly' mode which
can automatically can create Docker data container with Maven artefacts
exported from a directory "/maven".

Features:

* Wildfly Version: **8.1.0-Final**
* Java Version: **Oracle 1.7.0_51-b13** (base image: *dockerfile/java*)
* Port: **8080**
* User **admin** (Password: **admin**) has been added to access the Wildfly admin console
* Command: `/opt/wildfly/bin/deploy-and-run.sh` which links .war files from */maven* to
*/opt/wildfly/standalone/deployments* and then calls `standalone.sh`
* Sets `-Djava.security.egd=file:/dev/./urandom` for faster startup times
(though a bit less secure)
14 changes: 14 additions & 0 deletions wildfly/8.1/deploy-and-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
DIR=${DEPLOY_DIR:-/maven}
APPSRVHOME="/opt/wildfly"
echo "Checking *.war in $DIR"
if [ -d $DIR ]; then
for i in $DIR/*.war; do
file=$(basename $i)
dest="$APPSRVHOME/standalone/deployments/$file"
echo "Linking $i --> $dest"
ln -s $i $dest
done
fi
# start app server with fast but unsecure random number generator
JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom" $APPSRVHOME/bin/standalone.sh
21 changes: 21 additions & 0 deletions wildfly/8.1/mgmt-groups.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Properties declaration of users groups for the realm 'ManagementRealm'.
#
# This is used for domain management, users groups membership information is used to assign the user
# specific management roles.
#
# Users can be added to this properties file at any time, updates after the server has started
# will be automatically detected.
#
# The format of this file is as follows: -
#
# A utility script is provided which can be executed from the bin folder to add the users: -
# - Linux
# bin/add-user.sh
#
# - Windows
# bin\add-user.bat
#
# The following illustrates how an admin user could be defined.
#
admin=
26 changes: 26 additions & 0 deletions wildfly/8.1/mgmt-users.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Properties declaration of users for the realm 'ManagementRealm' which is the default realm
# for new installations. Further authentication mechanism can be configured
# as part of the <management /> in standalone.xml.
#
# Users can be added to this properties file at any time, updates after the server has started
# will be automatically detected.
#
# By default the properties realm expects the entries to be in the format: -
#
# A utility script is provided which can be executed from the bin folder to add the users: -
# - Linux
# bin/add-user.sh
#
# - Windows
# bin\add-user.bat
# On start-up the server will also automatically add a user $local - this user is specifically
# for local tools running against this AS installation.
#
# The following illustrates how an admin user could be defined, this
# is for illustration only and does not correspond to a usable password.
#
admin=c22052286cd5d72239a90fe193737253
#
#$REALM_NAME=ManagementRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
#