How to run a wildfly server inside docker

Before we begin you must configure docker, I am using Ubuntu so I followed the guide here: https://docs.docker.com/engine/installation/linux...

Before we begin you must configure docker, I am using Ubuntu so I followed the guide here: https://docs.docker.com/engine/installation/linux/ubuntulinux/. Choose the appropriate OS that applies to you.

Let's do this in sequence:

  1. Checkout and compile the very basic javaee war from https://github.com/czetsuya/hello-javaee.
  2. In Ubuntu create a new folder: wildfly-hello:
    >mkdir wildfly-hello
  3. Copy hello-javaee.war inside wildfly-hello.
  4. Create a Dockerfile and insert the lines below inside the same folder.

    from jboss/wildfly
    run /opt/jboss/wildfly/bin/add-user.sh admin admin@1234 --silent
    add hello-javaee.war /opt/jboss/wildfly/standalone/deployments/
    cmd ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
  5. Inside the wildfly-hello folder build the Dockerfile.
    >docker build -it wildfly-hello .
  6. Run the docker image
    >docker run wildfly-hello
  7. Get the ip address of the container by:
    >docker ps - to get the container id
    >docker inspect -f '{{ .NetworkSettings.IPAddress }}' CONTAINER_ID
  8. Now we should have the ip address of docker, we can now open wildfly in the browser.
What does the lines in step 3 means?
-from is a docker keyword use to import an image from docker hub hub.docker.com
-run is a command that runs an executable file, in this case we are adding a user with application management role
-add lets us add a file inside the container
-cmd tells the docker to execute this by default, when we execute docker run

COMMENTS

mas template
Name

amazon,1,angular,8,bigdata,2,business,1,course-spring,27,courses,6,database,4,docker,3,java,50,kafka,1,keycloak,4,microservices,5,mysql,1,neworking,1,nosql,2,php,1,pinned,2,react,3,server management,7,shared drive,1,spring,7,synology,1,troubleshooting,2,web,1,wordpress,1,
ltr
item
toztech: How to run a wildfly server inside docker
How to run a wildfly server inside docker
toztech
https://toztech.blogspot.com/2016/12/how-to-run-wildfly-server-inside-docker.html
https://toztech.blogspot.com/
https://toztech.blogspot.com/
https://toztech.blogspot.com/2016/12/how-to-run-wildfly-server-inside-docker.html
true
2554149350007112447
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content