In this post, you will learn about JBoss EAP on Podman
Introduction
JBoss EAP is an open-source platform for highly transactional, web-scale Java applications. JBoss EAP combines the familiar and popular Jakarta EE specifications with the latest technologies, like Eclipse MicroProfile, to modernize your applications from traditional Java EE into the new world of DevOps, cloud, containers, and microservices.
JBoss EAP includes everything needed to build, run, deploy, and manage enterprise Java applications in various environments, including on-premise, virtual, private, public, and hybrid clouds. JBoss EAP is based upon the popular open-source project WildFly.
Prerequisite
- Java 8 compliant JDK
- Administration privileges for the install directory
A JBoss EAP standalone server instance is an independent process (similar to previous JBoss EAP versions, e.g., 4 or 5). The configuration files, deployment content, and writable areas used by the standalone server are in the following subdirectories under the top-level standalone directory. In addition, JBoss EAP can overwrite some of the default directories for a JBoss EAP standalone server with system properties. These system properties must be passed to the start script or placed in the standalone.conf (loaded from standalone. sh) or standalone.bat.conf (loaded from standalone.bat) files. The following table shows the directories that files can override.
Red Hat’s latest JBoss EAP
Key features:
- Eclipse-based Integrated Development Environment (IDE) is available using JBoss Developer Studio.
- Supports Java EE and Web Services standards[5]
- Enterprise Java Beans (EJB)
- Java persistence using Hibernate
- Object request broker (ORB) using JacORB for interoperability with CORBA objects
- JBoss Seam framework, including Java annotations to enhance POJOs, and including JBoss jBPM
- JavaServer Faces (JSF), including RichFaces
- Web application services, including Apache Tomcat for JavaServer Pages (JSP) and Java Servlets
- Caching, clustering, and high availability are provided by the subsystem Infinispan (formerly JBoss Cache)
- EJB includes JNDI and RMI
- Security services, including Java Authentication and Authorization Service (JAAS) and pluggable authentication modules (PAM)
- Web Services and interoperability,[5] including JAX-RPC, JAX-WS, many WS-* standards, and MTOM/XOP
- Integration and messaging services, including J2EE Connector Architecture (JCA), Java Database Connectivity (JDBC), and Java Message Service (JMS)
- Management and Service-Oriented Architecture (SOA) using Java Management Extensions (JMX)
- Additional administration and monitoring features are available using JBoss Operations Network.
Prepare the containerfile JBoss eap
# dockerfile to build image for JBoss EAP 6.4
# start from rhel 7.2
FROM ubi7
# update OS
RUN yum -y update && \
yum -y install sudo openssh-clients unzip java-1.8.0-openjdk-devel && \
yum clean all
# enabling sudo group
# enabling sudo over ssh
RUN echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
sed -i 's/.*requiretty$/Defaults !requiretty/' /etc/sudoers
# add a user for the application, with sudo permissions
RUN useradd -m jboss ; echo jboss: | chpasswd ; usermod -a -G wheel jboss
# create workdir
RUN mkdir -p /opt/jboss
WORKDIR /opt/jboss
# install JBoss EAP 6.4.0
ADD jboss-eap-6.4.0.zip /opt/jboss
RUN unzip /opt/jboss/jboss-eap-6.4.0.zip
# set environment
ENV JBOSS_HOME /opt/jboss/jboss-eap-6.4
# create JBoss console user
RUN JBOSS_HOME/bin/add-user.sh admin admin@2022 --silent
# configure JBoss
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
# set permission folder
RUN chown -R jboss:jboss /opt/jboss
# JBoss ports
EXPOSE 8080 9990 9999
# start JBoss
ENTRYPOINT $JBOSS_HOME/bin/standalone.sh -c standalone-full-ha.xml
USER jboss
CMD /bin/bash
jboss podman – Built the image
podman build -t jboss-eap .
Create the container
podman run -dt --name jboss-app -p 8080:8080 -p 9990:9990 -p 9999:9999 localhost:/jboss-eap:latest