Compare commits

...

2 Commits

Author SHA1 Message Date
Salt bdbcebf366 Ignore permissions on rsync 2022-06-14 14:10:39 -05:00
Salt e48fa26b5a Try adding a user to the container 2022-06-14 14:10:19 -05:00
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,10 @@ ARG MINECRAFT_VERSION="1.16.5"
ARG FORGE_VERSION="36.2.26"
ARG JRE_VERSION="openjdk8-jre"
ARG UID=1520
ARG GID=1520
ARG USER=minecraft
# The first stage just builds up the modpack
FROM alpine:latest AS build
@ -29,7 +33,9 @@ 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
WORKDIR /minecraft
COPY --from=build /minecraft .
USER $USER
CMD [ "bash", "start-server.sh" ]
EXPOSE 25565

View File

@ -22,7 +22,7 @@ if [ -n "$FORGE_PACK_ZIP" ]; then
echo "Found modpack directory: $directory"
fi
echo "Syncing content to /minecraft"
rsync --ignore-existing "$directory"/ /minecraft/
rsync --no-perms --no-owner --no-group --ignore-existing "$directory"/ /minecraft/
popd > /dev/null 2>&1
fi