forked from sebastianfaulhaber/openshift-v3-showcase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sfaulhab
committed
Feb 10, 2016
1 parent
101f267
commit 1f74e4e
Showing
7 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_Store | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### Set the base image to Fedora | ||
FROM jboss/base-jdk:7 | ||
|
||
### File Author / Maintainer | ||
MAINTAINER "Sebastian Faulhaber" "[email protected]" | ||
|
||
### Install EAP 6.4.0 | ||
COPY installs/jboss-eap-6.4.0.zip /tmp/jboss-eap-6.4.0.zip | ||
RUN unzip /tmp/jboss-eap-6.4.0.zip | ||
|
||
### Set Environment | ||
ENV JBOSS_HOME /opt/jboss/jboss-eap-6.4 | ||
|
||
### Create EAP User | ||
RUN $JBOSS_HOME/bin/add-user.sh admin admin123! --silent | ||
|
||
### Configure EAP | ||
RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0\"" >> $JBOSS_HOME/bin/standalone.conf | ||
|
||
### Open Ports | ||
EXPOSE 8080 9990 9999 | ||
|
||
### Start EAP | ||
ENTRYPOINT $JBOSS_HOME/bin/standalone.sh -c standalone-full-ha.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Download the JBoss Enterprise Application Platform (EAP) distribution (`jboss-eap-6.4.0.zip`) from Red Hat Customer Portal (https://access.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=37393&product=appplatform&version=6.4&downloadType=distributions) and place it into this folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### Set the base image to the one built before | ||
FROM sfaulhab/jboss-eap-6.4 | ||
|
||
### File Author / Maintainer | ||
MAINTAINER "Sebastian Faulhaber" "[email protected]" | ||
|
||
### Add application to JBoss EAP | ||
COPY app/jboss-as-helloworld.war $JBOSS_HOME/standalone/deployments/ |
Binary file added
BIN
+5.89 KB
jboss-docker-basics/02-jboss-eap-with-app/app/jboss-as-helloworld.war
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# 1. Docker basics | ||
``` | ||
# Run DOCKER hello-world container | ||
# 1. Explain pull mechanism | ||
# 2. Highlight container output | ||
docker run hello-world | ||
# Show the pulled image / explain registry | ||
docker images | ||
# Show "hello-world" a second time (it runs damn fast now!) | ||
docker run hello-world | ||
# Demonstrate an interactive container based on ubuntu | ||
docker run -it ubuntu bash | ||
# Show that we're actually running Ubuntu on a RHEL guest | ||
cat /etc/*-release | ||
``` | ||
|
||
# 2. Run JBoss Enterprise Application Platform (EAP) within a Docker container | ||
|
||
``` | ||
# Walk through Dockerfile | ||
# Build the image | ||
docker build --rm -t sfaulhab/jboss-eap-6.4 01-jboss-eap | ||
# Show the image in Docker registry | ||
docker images | ||
# Run the container | ||
docker run -d -P sfaulhab/jboss-eap-6.4 | ||
# Show information about running container (get external port) | ||
docker ps | grep sfaulhab | ||
# Connect into running container | ||
docker exec -ti <container-id> /bin/bash | ||
# Open browser and login to JBoss EAP console | ||
# Stop container | ||
docker stop <container-id> | ||
``` | ||
|
||
|
||
# 3. Run JBoss Enterprise Application Platform (EAP) incl. custom application | ||
|
||
``` | ||
# Walk through Dockerfile | ||
# Build the image | ||
docker build --rm -t sfaulhab/jboss-eap-helloworld 02-jboss-eap-with-app | ||
# Show the image in Docker registry | ||
docker images | ||
# Run the container | ||
docker run -d -P sfaulhab/jboss-eap-helloworld | ||
# Show information about running container (get external port) | ||
docker ps | grep sfaulhab | ||
# Open browser and login to JBoss EAP console: http://localhost:32785/jboss-as-helloworld/ | ||
# Stop container | ||
docker stop <container-id> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# Cleanup old images | ||
docker rmi -f docker.io/hello-world | ||
docker rmi -f sfaulhab/jboss-eap-6.4 | ||
docker rmi -f sfaulhab/jboss-eap-helloworld |