From 30802403cc2e488b51def4607562b36a3f945fc5 Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 14 Jun 2022 14:14:21 -0500 Subject: [PATCH] Use busyboxisms for creating a user/group --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3beadc7..1255fa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,9 @@ ARG FORGE_VERSION="36.2.26" ARG JRE_VERSION="openjdk8-jre" ARG UID=1520 -ARG GID=1520 ARG USER=minecraft +ARG GID=1520 +ARG GROUP=minecraft # The first stage just builds up the modpack FROM alpine:latest AS build @@ -33,7 +34,8 @@ ARG JRE_VERSION # Build the thing up RUN apk add bash curl findutils rsync screen "${JRE_VERSION}" -RUN groupadd -g $GID -o $USER && useradd -m -u $UID -g $GID -o -s /bin/bash $USER +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