Skip to content

Commit

Permalink
updates for the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jperrin committed Oct 16, 2014
1 parent c0e351a commit cd0d31b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions wildfly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ This is an example Dockerfile with [WildFly application server](http://wildfly.o

To boot in standalone mode

docker run -it jboss/wildfly
docker run -it centos/wildfly

To boot in domain mode

docker run -it jboss/wildfly /opt/wildfly/bin/domain.sh -b 0.0.0.0 -bmanagement 0.0.0.0
docker run -it centos/wildfly /opt/wildfly/bin/domain.sh -b 0.0.0.0 -bmanagement 0.0.0.0

## Application deployment

Expand All @@ -21,17 +21,17 @@ With the WildFly server you can [deploy your application in multiple ways](https
3. You can use the management API directly
4. You can use the deployment scanner

The most popular way of deploying an application is using the deployment scanner. In WildFly this method is enabled by default and the only thing you need to do is to place your application inside of the `deployments/` directory. It can be `/opt/wildfly/standalone/deployments/` or `/opt/wildfly/domain/deployments/` depending on [which mode](https://docs.jboss.org/author/display/WFLY8/Operating+modes) you choose (standalone is default in the `jboss/wildfly` image -- see above).
The most popular way of deploying an application is using the deployment scanner. In WildFly this method is enabled by default and the only thing you need to do is to place your application inside of the `deployments/` directory. It can be `/opt/wildfly/standalone/deployments/` or `/opt/wildfly/domain/deployments/` depending on [which mode](https://docs.jboss.org/author/display/WFLY8/Operating+modes) you choose (standalone is default in the `centos/wildfly` image -- see above).

The simplest and cleanest way to deploy an application to WildFly running in a container started from the `jboss/wildfly` image is to use the deployment scanner method mentioned above.
The simplest and cleanest way to deploy an application to WildFly running in a container started from the `centos/wildfly` image is to use the deployment scanner method mentioned above.

To do this you just need to extend the `jboss/wildfly` image by creating a new one. Place your application inside the `deployments/` directory with the `ADD` command (but make sure to include the trailing slash on the deployment folder path, [more info](https://docs.docker.com/reference/builder/#add)). You can also do the changes to the configuration (if any) as additional steps (`RUN` command).
To do this you just need to extend the `centos/wildfly` image by creating a new one. Place your application inside the `deployments/` directory with the `ADD` command (but make sure to include the trailing slash on the deployment folder path, [more info](https://docs.docker.com/reference/builder/#add)). You can also do the changes to the configuration (if any) as additional steps (`RUN` command).

[A simple example](https://github.com/goldmann/wildfly-docker-deployment-example) was prepared to show how to do it, but the steps are following:

1. Create `Dockerfile` with following content:

FROM jboss/wildfly
FROM centos/wildfly
ADD your-awesome-app.war /opt/wildfly/standalone/deployments/
2. Place your `your-awesome-app.war` file in the same directory as your `Dockerfile`.
3. Run the build with `docker build --tag=wildfly-app .`
Expand All @@ -47,28 +47,30 @@ This way of deployment is great because of a few things:

To be able to create a management user to access the administration console create a Dockerfile with the following content

FROM jboss/wildfly
FROM centos/wildfly
RUN /opt/wildfly/bin/add-user.sh admin Admin#70365 --silent

Then you can build the image:

docker build --tag=jboss/wildfly-admin .
docker build --tag=centos/wildfly-admin .

Run it:

docker run -it -p 9990:9990 jboss/wildfly-admin
docker run -it -p 9990:9990 centos/wildfly-admin

The administration console should be available at http://localhost:9990.

## Building on your own

You don't need to do this on your own, because we prepared a trusted build for this repository, but if you really want:

docker build --rm=true --tag=jboss/wildfly .
docker build --rm=true --tag=centos/wildfly .

## Source
This source is available at
[https://github.com/CentOS/CentOS-Dockerfiles/](https://github.com/CentOS/CentOS-Dockerfiles/)

The source is [available on GitHub](https://github.com/jboss/dockerfiles/tree/master/wildfly).
The original source this is based on can be found at [jboss-dockerfiles](https://github.com/jboss/dockerfiles/tree/master/wildfly).

## Issues

Expand Down

0 comments on commit cd0d31b

Please sign in to comment.