Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
daggerok authored Feb 14, 2020
1 parent 15d27f5 commit ff9acf1
Showing 1 changed file with 20 additions and 29 deletions.
49 changes: 20 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM daggerok/jboss-eap-7.1:7.1.5-centos
FROM daggerok/jboss-eap-7.1:7.1.5-alpine
LABEL MAINTAINER='Maksim Kostromin <[email protected]>'
ENV PRODUCT='jboss-eap-7.1' \
JBOSS_USER='jboss'
Expand All @@ -9,28 +9,26 @@ ENV JBOSS_HOME="${JBOSS_USER_HOME}/${PRODUCT}" \
PATCHES_BASE_URL="${DOWNLOAD_BASE_URL}/${JBOSS_EAP_PATCH}"
ENV PATH="${JBOSS_HOME}/bin:/tmp:${PATH}"
USER ${JBOSS_USER}
RUN sudo yum update --security -y \
&& sudo yum update -y \
&& sudo yum install -y sudo
RUN ( sudo apk fix --no-cache || echo 'cannot fix.' ) \
&& ( sudo apk add --upgrade --no-cache sudo || echo 'cannot upgrade.' )
WORKDIR /tmp
ADD --chown=jboss ./install.sh .
RUN ( standalone.sh --admin-only \
& ( sudo chmod +x /tmp/install.sh \
&& install.sh \
&& sudo yum autoremove -y \
&& sudo yum clean all -y \
&& sudo rm -rf /tmp/* ) )
&& ( sudo apk cache -v clean || echo 'cannot clean cache.' ) \
&& sudo rm -rf /tmp/* ) )
WORKDIR ${JBOSS_USER_HOME}

############################################### USAGE ##################################################
# #
# FROM daggerok/jboss-eap-7.1:7.1.61-centos #
# FROM daggerok/jboss-eap-7.1:7.1.61-alpine #
# #
# # debug: #
# ENV JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" #
# EXPOSE 5005 #
# #
# # health check: #
# # health-check: #
# HEALTHCHECK --timeout=1s \ #
# --retries=33 \ #
# CMD test `netstat -ltnp | grep 9990 | wc -l` -ge 1 || exit 1 #
Expand All @@ -39,46 +37,41 @@ WORKDIR ${JBOSS_USER_HOME}
# --retries=33 \ #
# CMD wget -q --spider http://127.0.0.1:8080/my-service/health || exit 1 #
# #
# # multi deployment: #
# # multi-deployment: #
# COPY --chown=jboss ./path/to/apps/*.war ./path/to/libs/*.war ${JBOSS_HOME}/standalone/deployments/ #
# #
########################################################################################################

## FROM registry.access.redhat.com/rhel7:7.6-119 or rhel7-minimal:7.6-119
## https://access.redhat.com/containers/?tab=changeSummary
#FROM centos:centos7.5.1804
#FROM openjdk:8u181-jdk-alpine3.8
#LABEL MAINTAINER='Maksim Kostromin <[email protected]>'
#ENV PRODUCT='jboss-eap-7.1' \
# JBOSS_USER='jboss'
#ENV ADMIN_USER='admin' \
# ADMIN_PASSWORD='Admin.123' \
# JDK_VERSION='jdk1.8.0_191' \
# JBOSS_USER_HOME="/home/${JBOSS_USER}" \
# DOWNLOAD_BASE_URL="https://github.com/daggerok/${PRODUCT}/releases/download" \
# JBOSS_EAP_PATCH='7.1.1'
#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/${JDK_VERSION}"
#ENV PATH="${JBOSS_HOME}/bin:/tmp:${PATH}"
#USER root
#RUN yum update -y && \
# yum update --security -y && \
# yum install -y wget ca-certificates unzip sudo openssh-client unzip zip net-tools && \
#RUN ( apk fix --no-cache || echo 'cannot fix.' ) && \
# ( apk upgrade --no-cache || echo 'cannot upgrade.' ) && \
# ( apk cache -v clean || echo 'cannot clean cache.' ) && \
# apk add --no-cache --update --upgrade \
# busybox-suid bash wget ca-certificates unzip sudo openssh-client shadow && \
# echo "${JBOSS_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
# adduser -U -m -d /home/jboss -s /bin/bash jboss && \
# sed -i 's/.*requiretty$/Defaults !requiretty/' /etc/sudoers && \
# adduser -h ${JBOSS_USER_HOME} -s /bin/bash -D ${JBOSS_USER} ${JBOSS_USER} && \
# usermod -a -G ${JBOSS_USER} ${JBOSS_USER}
#USER ${JBOSS_USER}
#CMD /bin/bash
#ENTRYPOINT standalone.sh
#EXPOSE 8080 8443 9990
#WORKDIR /tmp
#ADD --chown=jboss ./install.sh .
#RUN wget ${ARCHIVES_BASE_URL}/${JDK_VERSION}.tar.gz \
# -q --no-cookies --no-check-certificate -O /tmp/${JDK_VERSION}.tar.gz && \
# sudo mkdir -p /usr/lib/jvm && \
# sudo tar xzfz /tmp/${JDK_VERSION}.tar.gz -C /usr/lib/jvm/ && \
# wget ${ARCHIVES_BASE_URL}/jce_policy-8.zip \
#RUN wget ${ARCHIVES_BASE_URL}/jce_policy-8.zip \
# -q --no-cookies --no-check-certificate -O /tmp/jce_policy-8.zip && \
# unzip -q /tmp/jce_policy-8.zip -d /tmp && \
# ( sudo mv -f ${JAVA_HOME}/lib/security ${JAVA_HOME}/lib/backup-security || echo 'no backups.' ) && \
Expand All @@ -92,8 +85,6 @@ WORKDIR ${JBOSS_USER_HOME}
# ( 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...' ) ) )
# sudo apk del --no-cache --no-network --purge busybox-suid unzip openssh-client shadow && \
# ( sudo rm -rf /tmp/* /var/cache/apk /var/lib/apk /etc/apk/cache || echo 'cleanup!' ) ) )
#WORKDIR ${JBOSS_USER_HOME}

0 comments on commit ff9acf1

Please sign in to comment.