From 07c8bfd16587710083bd7ed09169ddb92ea57e7a Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 14 Jun 2022 14:16:51 -0500 Subject: [PATCH] Quote variables, actually scope in our arguments --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1255fa7..4296a99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,11 +31,15 @@ FROM alpine:latest AS final # Use only a subset of arguments ARG JRE_VERSION +ARG UID +ARG USER +ARG GID +ARG GROUP # Build the thing up RUN apk add bash curl findutils rsync screen "${JRE_VERSION}" -RUN addgroup -g $GID $USER && \ - adduser -h /minecraft -s /bin/sh -G $GROUP -D -H -u $UID +RUN addgroup -g "${GID}" "${USER}" && \ + adduser -h /minecraft -s /bin/sh -G "${GROUP}" -D -H -u "${UID}" WORKDIR /minecraft COPY --from=build /minecraft . USER $USER