Skip to content

Commit

Permalink
JBoss EAP 7.3.0 on Debian Buster.
Browse files Browse the repository at this point in the history
  • Loading branch information
daggerok committed Apr 22, 2020
1 parent a62cd0c commit 6151116
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
- DOCKER_IMAGE_NAME=jboss-eap-7.3
- secure: "Yas+0gZOHWZYIn4ce062J2SVW8/SJsWc8uggE7EGF73qp9qP2JZXy1U77Wn6FiNYYwNzmbdcYVt0L4+mzc/tSAGnl6U7YvYGSmBFmNz84DalOxGebGHVWLNiQKNMshNa5HwUcm+J1rPB7Hu9Xn41MfWZIM0duCNx92+WkYPz3ea2A5MNhk3GTAnsf23vtdXnGJw1U8a5Ibcmf80DI2H2tMFUKJ97XAtFCkBtBiWq29AVPSkMMVbNv3DZWC4zl7fKuuMKZDyQyfMSpROxsEv66+Z5BYYUSqG9m0Lqcsg7FWfMK4gHsxbD1IdPyPq15ymclBNQTQbKjfEJGFZO0zPnXihxYXfA0r+pkcnkVAKrxopp3vcFW9fuZI4RJ5B5d+5ZUmDp0kzthzPXcVXOh8aXq7YBp8a6uxC/0M6bfvgYFfeXGxgH2Im+M5SXBiKJACgDjOIbN5Szb5XckQHmxZkzAt9Lm2XnXDhxbpgHeE4kXgEQILFXw7tIMJDozXClyoOffVzJrGmqmx9+qZde7FaTjWaD4yQUkDqslRlkJWKc1noibG0KbsLRY3HaXv+A3qctIAI1NNJK26FHi/IgwvNzS2P+bD+LCMdAxat4CKEC0SyRzjAyHEffDkLv8HrDUf4HkW2/sejNe0nAAdUft9Fg+Q+0t4SASsdEBfZGKTW8Fos="
install: true
if: tag ~= alpine$ OR tag ~= centos$ OR branch == master
if: tag ~= debian$ OR tag ~= alpine$ OR tag ~= centos$ OR branch == master
script:
- docker system prune -af --volumes
- docker build -t ${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME} .
Expand Down
56 changes: 27 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,46 @@
FROM centos:centos8.1.1911
FROM openjdk:11.0.7-jdk-slim-buster
LABEL MAINTAINER="Maksim Kostromin <daggerok@gmail.com>"
ENV PRODUCT="jboss-eap-7.3" \
ENV PRODUCT="jboss-eap-7.3" \
JBOSS_USER="jboss"
ENV ADMIN_USER="admin" \
ADMIN_PASSWORD="Admin.123" \
JBOSS_USER_HOME="/home/${JBOSS_USER}" \
DOWNLOAD_BASE_URL="https://github.com/daggerok/${PRODUCT}/releases/download" \
ENV ADMIN_USER="admin" \
ADMIN_PASSWORD="Admin.123" \
JBOSS_USER_HOME="/home/${JBOSS_USER}" \
DOWNLOAD_BASE_URL="https://github.com/daggerok/${PRODUCT}/releases/download" \
JBOSS_EAP_PATCH="7.3.0"
ENV JBOSS_HOME="${JBOSS_USER_HOME}/${PRODUCT}" \
ARCHIVES_BASE_URL="${DOWNLOAD_BASE_URL}/archives" \
ENV JBOSS_HOME="${JBOSS_USER_HOME}/${PRODUCT}" \
ARCHIVES_BASE_URL="${DOWNLOAD_BASE_URL}/archives" \
PATCHES_BASE_URL="${DOWNLOAD_BASE_URL}/${JBOSS_EAP_PATCH}"
ENV PATH="${JBOSS_HOME}/bin:/tmp:${PATH}" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk" \
ENV PATH="${JBOSS_HOME}/bin:/tmp:${PATH}" \
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0"
USER root
RUN yum update --security -y -q && \
yum install -y -q unzip openssh-clients zip net-tools \
wget ca-certificates curl sudo java-1.8.0-openjdk-devel && \
echo "${JBOSS_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
groupadd --system --gid 1001 ${JBOSS_USER} && \
adduser --system -m -d ${JBOSS_USER_HOME} -s /sbin/bash -g ${JBOSS_USER} --uid 1001 ${JBOSS_USER} && \
usermod -a -G ${JBOSS_USER} ${JBOSS_USER}
RUN ( apt-get update -y || echo "cannot update." ) && \
apt-get install -y wget ca-certificates unzip sudo openssh-client net-tools && \
echo "${JBOSS_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
sed -i "s/.*requiretty$/Defaults !requiretty/" /etc/sudoers && \
addgroup --system --gid 1001 ${JBOSS_USER} && \
adduser --system --home ${JBOSS_USER_HOME} --shell /bin/ash --gid 1001 --uid 1001 ${JBOSS_USER}
USER ${JBOSS_USER}
EXPOSE 8080 8443 9990
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["${JBOSS_HOME}/bin/standalone.sh -b 0.0.0.0"]
WORKDIR /tmp
ADD --chown=jboss ./install.sh .
RUN wget ${ARCHIVES_BASE_URL}/jboss-eap-7.3.0.zip \
-q --no-cookies --no-check-certificate -O /tmp/jboss-eap-7.3.0.zip && \
unzip -q /tmp/jboss-eap-7.3.0.zip -d ${JBOSS_USER_HOME} && \
add-user.sh ${ADMIN_USER} ${ADMIN_PASSWORD} --silent && \
( standalone.sh --admin-only \
& ( sudo chmod +x /tmp/install.sh && \
install.sh && \
rm -rf /tmp/install.sh && \
sudo yum autoremove -y && \
sudo yum clean all -y && \
( sudo rm -rf /tmp/* /var/cache/yum || echo "something was not removed..." ) ) )
RUN wget ${ARCHIVES_BASE_URL}/jboss-eap-7.3.0.zip \
-q --no-cookies --no-check-certificate -O /tmp/jboss-eap-7.3.0.zip && \
unzip -q /tmp/jboss-eap-7.3.0.zip -d ${JBOSS_USER_HOME} && \
add-user.sh ${ADMIN_USER} ${ADMIN_PASSWORD} --silent && \
( standalone.sh --admin-only \
& ( sudo chmod +x /tmp/install.sh && \
install.sh && \
sudo apt-get purge -y unzip openssh-client && \
sudo apt-get autoremove -y && \
sudo apt-get autoclean -y && \
( sudo rm -rf /tmp/* || echo "cleanup!" ) ) )
WORKDIR ${JBOSS_USER_HOME}

############################################ USAGE ##############################################
# #
# FROM daggerok/jboss-eap-7.3:7.3.0-centos #
# FROM daggerok/jboss-eap-7.3:7.3.0-debian #
# #
# # debug: #
# ENV JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" #
Expand Down
45 changes: 45 additions & 0 deletions Dockerfile.debian-extends-jdk11
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM daggerok/jboss-eap-7.3:7.3.0-debian
LABEL MAINTAINER="Maksim Kostromin <daggerok@gmail.com>"
ENV PRODUCT="jboss-eap-7.3" \
JBOSS_USER="jboss"
ENV JBOSS_USER_HOME="/home/${JBOSS_USER}" \
DOWNLOAD_BASE_URL="https://github.com/daggerok/${PRODUCT}/releases/download" \
JBOSS_EAP_PATCH="7.3.0"
ENV JBOSS_HOME="${JBOSS_USER_HOME}/${PRODUCT}" \
PATCHES_BASE_URL="${DOWNLOAD_BASE_URL}/${JBOSS_EAP_PATCH}"
ENV PATH="${JBOSS_HOME}/bin:/tmp:${PATH}" \
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0"
USER ${JBOSS_USER}
RUN sudo apt-get update -y
WORKDIR /tmp
ADD --chown=jboss ./install.sh .
RUN ( standalone.sh --admin-only \
& ( sudo chmod +x /tmp/install.sh \
&& install.sh \
&& sudo apt-get autoremove -y \
&& sudo apt-get autoclean -y \
&& sudo rm -rf /tmp/* ) )
WORKDIR ${JBOSS_USER_HOME}

############################################ USAGE ##############################################
# #
# FROM daggerok/jboss-eap-7.3:7.3.0-debian #
# #
# # debug: #
# ENV JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" #
# EXPOSE 5005 #
# #
# # health-check: #
# HEALTHCHECK --retries=33 \ #
# --timeout=1s \ #
# --interval=1s \ #
# --start-period=3s \ #
# CMD wget -q --spider http://127.0.0.1:8080/my-service/health || exit 1 #
# #CMD curl -f http://127.0.0.1:8080/my-servicehealth || exit 1 #
# #CMD test `netstat -ltnp | grep 9990 | wc -l` -ge 1 || exit 1 #
# COPY --chown=jboss ./target/*.war ${JBOSS_HOME}/standalone/deployments/my-service.war #
# #
# # or multi-deployment: #
# COPY --chown=jboss ./target/*.war ./build/libs/*.war ${JBOSS_HOME}/standalone/deployments/ #
# #
#################################################################################################
62 changes: 62 additions & 0 deletions Dockerfile.debian-from-scratch-jdk11
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FROM openjdk:11.0.7-jdk-slim-buster
LABEL MAINTAINER="Maksim Kostromin <daggerok@gmail.com>"
ENV PRODUCT="jboss-eap-7.3" \
JBOSS_USER="jboss"
ENV ADMIN_USER="admin" \
ADMIN_PASSWORD="Admin.123" \
JBOSS_USER_HOME="/home/${JBOSS_USER}" \
DOWNLOAD_BASE_URL="https://github.com/daggerok/${PRODUCT}/releases/download" \
JBOSS_EAP_PATCH="7.3.0"
ENV JBOSS_HOME="${JBOSS_USER_HOME}/${PRODUCT}" \
ARCHIVES_BASE_URL="${DOWNLOAD_BASE_URL}/archives" \
PATCHES_BASE_URL="${DOWNLOAD_BASE_URL}/${JBOSS_EAP_PATCH}"
ENV PATH="${JBOSS_HOME}/bin:/tmp:${PATH}" \
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0"
USER root
RUN ( apt-get update -y || echo "cannot update." ) && \
apt-get install -y wget ca-certificates unzip sudo openssh-client net-tools && \
echo "${JBOSS_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
sed -i "s/.*requiretty$/Defaults !requiretty/" /etc/sudoers && \
addgroup --system --gid 1001 ${JBOSS_USER} && \
adduser --system --home ${JBOSS_USER_HOME} --shell /bin/ash --gid 1001 --uid 1001 ${JBOSS_USER}
USER ${JBOSS_USER}
EXPOSE 8080 8443 9990
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["${JBOSS_HOME}/bin/standalone.sh -b 0.0.0.0"]
WORKDIR /tmp
ADD --chown=jboss ./install.sh .
RUN wget ${ARCHIVES_BASE_URL}/jboss-eap-7.3.0.zip \
-q --no-cookies --no-check-certificate -O /tmp/jboss-eap-7.3.0.zip && \
unzip -q /tmp/jboss-eap-7.3.0.zip -d ${JBOSS_USER_HOME} && \
add-user.sh ${ADMIN_USER} ${ADMIN_PASSWORD} --silent && \
( standalone.sh --admin-only \
& ( sudo chmod +x /tmp/install.sh && \
install.sh && \
sudo apt-get purge -y unzip openssh-client && \
sudo apt-get autoremove -y && \
sudo apt-get autoclean -y && \
( sudo rm -rf /tmp/* || echo "cleanup!" ) ) )
WORKDIR ${JBOSS_USER_HOME}

############################################ USAGE ##############################################
# #
# FROM daggerok/jboss-eap-7.3:7.3.0-debian #
# #
# # debug: #
# ENV JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" #
# EXPOSE 5005 #
# #
# # health-check: #
# HEALTHCHECK --retries=33 \ #
# --timeout=1s \ #
# --interval=1s \ #
# --start-period=3s \ #
# CMD wget -q --spider http://127.0.0.1:8080/my-service/health || exit 1 #
# #CMD curl -f http://127.0.0.1:8080/my-servicehealth || exit 1 #
# #CMD test `netstat -ltnp | grep 9990 | wc -l` -ge 1 || exit 1 #
# COPY --chown=jboss ./target/*.war ${JBOSS_HOME}/standalone/deployments/my-service.war #
# #
# # or multi-deployment: #
# COPY --chown=jboss ./target/*.war ./build/libs/*.war ${JBOSS_HOME}/standalone/deployments/ #
# #
#################################################################################################
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ JBoss EAP 7.3 Docker automation build based on centos8 / alpine3 images
## usage

```Dockerfile
FROM daggerok/jboss-eap-7.3:7.3.0-alpine
FROM daggerok/jboss-eap-7.3:7.3.0-debian
COPY --chown=jboss ./target/*.war ${JBOSS_HOME}/standalone/deployments/my-service.war
```

Expand Down Expand Up @@ -73,4 +73,7 @@ git push origin --tags
git tag 7.3.0-alpine
git push origin --tags
git tag 7.3.0-debian
git push origin --tags
-->

0 comments on commit 6151116

Please sign in to comment.