diff --git a/Dockerfile b/Dockerfile index afbdd6e..2a713ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ FROM alpine:latest AS final ARG JRE_VERSION # Build the thing up -RUN apk add bash curl rsync screen "${JRE_VERSION}" +RUN apk add bash curl findutils rsync screen "${JRE_VERSION}" WORKDIR /minecraft COPY --from=build /minecraft . CMD [ "bash", "start-server.sh" ] diff --git a/start-server.sh b/start-server.sh index 4b48e31..a8f7d99 100755 --- a/start-server.sh +++ b/start-server.sh @@ -13,14 +13,15 @@ if [ -n "$FORGE_PACK_ZIP" ]; then tmpdir="$(mktemp -d)" pushd "$tmpdir" > /dev/null 2>&1 curl -L "$FORGE_PACK_ZIP" -o pack.zip - unzip pack.zip + unzip -q pack.zip + ls -alh directory="$(find . -type d -iname "mods" -execdir pwd \; | sort -n | head -n 1)" if [ -z "$directory" ]; then echo "Unable to find mods directory" else echo "Found modpack directory: $directory" fi - rsync -av --ignore-existing "$directory"/ /minecraft/ + rsync -a --ignore-existing "$directory"/ /minecraft/ popd > /dev/null 2>&1 fi