diff --git a/Dockerfile b/Dockerfile index 40eebdcdf..6bec664fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,9 +29,8 @@ ARG group=jenkins ARG uid=1000 ARG gid=1000 -ENV HOME /home/${user} RUN groupadd -g ${gid} ${group} -RUN useradd -c "Jenkins user" -d $HOME -u ${uid} -g ${gid} -m ${user} +RUN useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} LABEL Description="This is a base image, which provides the Jenkins agent executable (slave.jar)" Vendor="Jenkins project" Version="${VERSION}" ARG AGENT_WORKDIR=/home/${user}/agent diff --git a/Dockerfile-alpine b/Dockerfile-alpine index 33fb86074..4f2cd248a 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -29,9 +29,8 @@ ARG group=jenkins ARG uid=1000 ARG gid=1000 -ENV HOME /home/${user} RUN addgroup -g ${gid} ${group} -RUN adduser -h $HOME -u ${uid} -G ${group} -D ${user} +RUN adduser -h /home/${user} -u ${uid} -G ${group} -D ${user} LABEL Description="This is a base image, which provides the Jenkins agent executable (slave.jar)" Vendor="Jenkins project" Version="${VERSION}" ARG AGENT_WORKDIR=/home/${user}/agent diff --git a/Dockerfile-jdk11 b/Dockerfile-jdk11 index 6e8b6357e..88de258ed 100644 --- a/Dockerfile-jdk11 +++ b/Dockerfile-jdk11 @@ -29,9 +29,8 @@ ARG group=jenkins ARG uid=1000 ARG gid=1000 -ENV HOME /home/${user} RUN groupadd -g ${gid} ${group} -RUN useradd -c "Jenkins user" -d $HOME -u ${uid} -g ${gid} -m ${user} +RUN useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} LABEL Description="This is a base image, which provides the Jenkins agent executable (slave.jar)" Vendor="Jenkins project" Version="${VERSION}" ARG AGENT_WORKDIR=/home/${user}/agent