Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Running WildFly in Docker


In this recipe, you will learn how to run WildFly in a Docker container by creating a Dockerfile, which describes how the image should be composed. To go through this recipe, you need to have a working Docker installation, along with a Fedora 21 image; if you don't have these installed, please follow the first recipe in this chapter.

Getting ready

In this recipe, you will need an internet connection to download WildFly directly from the container. Also, we will need a Java web application to test our WildFly installation. If you want, you can use one of my projects from my GitHub account, at https://github.com/foogaro/wildfly-cookbook.git.

You can git-clone the repository or just download it as a ZIP archive:

  1. Place the source at ~/WFC/github.

  2. There you will find a project called docker-example. To compile the project, run the following commands:

    $ cd ~/WFC/github
    $ cd wildfly-cookbook
    $ cd docker-example
    $ mvn clean package

    In the target folder generated by Maven, you...