From 12a185afdcd6469c9e14e0a1cbaac5ae80304cc7 Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 22 Apr 2017 15:52:59 -0500 Subject: [PATCH] Conform to Docker best practices Separated RUN commands onto different lines for readability. Reduced both run commands into one in order to reduce image layers. --- Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3764fbb..13399d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,17 @@ FROM centos:7 MAINTAINER Marek Goldmann -# Install packages necessary to run EAP -RUN yum update -y && yum -y install xmlstarlet saxon augeas bsdtar unzip && yum clean all - -# Create a user and group used to launch processes +# Install packages necessary to run EAP. +# Then, create a user and group used to launch processes # The user ID 1000 is the default for the first "regular" user on Fedora/RHEL, # so there is a high chance that this ID will be equal to the current user # making it easier to use volumes (no permission issues) -RUN groupadd -r jboss -g 1000 && useradd -u 1000 -r -g jboss -m -d /opt/jboss -s /sbin/nologin -c "JBoss user" jboss && \ - chmod 755 /opt/jboss +RUN yum update -y \ + && yum -y install xmlstarlet saxon augeas bsdtar unzip \ + && yum clean all \ + && groupadd -r jboss -g 1000 \ + && useradd -u 1000 -r -g jboss -m -d /opt/jboss -s /sbin/nologin -c "JBoss user" jboss + && chmod 755 /opt/jboss # Set the working directory to jboss' user home directory WORKDIR /opt/jboss