Wildfly CRUD example with Docker

I’m not that familiar with pure Java EE stack. My experience is mostly mixing Java EE with Spring. So, I just wanted to play with it. You can find it here:

Java EE
Apache Deltaspike (similiar to Spring Data)
H2 Database

It is just an example and far from real application. It will be required to add tests for sure and it would be interesting to do it this way:
Docker with Arquillian Cube

Install Docker first… I’m using Intellij IDEA Ultimate, to add docker to this IDE:
1. File-> Settings-> Builds, Executions, Deployment -> Clouds
2. Add Docker with API URL = unix:///var/run/docker.sock

My dockerfile is simple and using jboss/wildfly image.

FROM jboss/wildfly
ADD target/wildfly-template.war /opt/jboss/wildfly/standalone/deployments/
RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#70365 --silent
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "", "-bmanagement", ""]

To run it:
1. Run -> Run… -> Edit Configurations
2. Add Docker deployment
3. Add image tag and container name in Deployment Tab
4. Generate new container_settings.json in Container tab
5. Run it 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s