Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz

ARG MC_HELPER_VERSION=1.38.16
ARG MC_HELPER_VERSION=1.39.0
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1
Expand Down
20 changes: 15 additions & 5 deletions docs/types-and-platforms/server-types/paper.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
Enable Paper server mode by adding a `-e TYPE=PAPER` to your command-line.
A [PaperMC server](https://papermc.io/) can be automatically downloaded, upgraded, and run by setting the environment variable TYPE to "PAPER".

By default, the container will run the latest build of [Paper server](https://papermc.io/downloads) but you can also choose to run a specific build with `-e PAPERBUILD=205`.
By default, the container will find and download the latest build for the `VERSION` chosen. If `VERSION` is not specified, then the latest Minecraft version released by PaperMC is selected. Along with a specific `VERSION`, a specific Paper build can be selected by setting the environment variable `PAPER_BUILD`.

docker run -d -v /path/on/host:/data \
-e TYPE=PAPER \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "experimental", otherwise only release/default channel builds are selected.

!!! example

```
docker run ... -e TYPE=PAPER ...

docker run ... -e TYPE=PAPER -e VERSION=1.20.6 ...

docker run ... -e TYPE=PAPER -e VERSION=1.20.6 -e PAPER_BUILD=140 ...

docker run ... -e TYPE=PAPER -e PAPER_CHANNEL=experimental ...
```

If you are hosting your own copy of Paper you can override the download URL with `PAPER_DOWNLOAD_URL=<url>`.

Expand Down
8 changes: 5 additions & 3 deletions scripts/start-deployPaper
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -o pipefail
handleDebugMode

: "${PAPER_PROJECT:=paper}"
: "${PAPERBUILD:=}"
: "${PAPER_BUILD:=${PAPERBUILD:-}}"
: "${PAPER_CHANNEL:=default}"
: "${PAPER_DOWNLOAD_URL:=}"
: "${PAPER_CUSTOM_JAR:=}"
: "${PAPER_CONFIG_DEFAULTS_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}"
Expand Down Expand Up @@ -34,9 +35,10 @@ else
--results-file="$resultsFile"
--project="$PAPER_PROJECT"
--version="$VERSION"
--channel="$PAPER_CHANNEL"
)
if [[ $PAPERBUILD ]]; then
args+=(--build="$PAPERBUILD")
if [[ $PAPER_BUILD ]]; then
args+=(--build="$PAPER_BUILD")
fi
if ! mc-image-helper install-paper "${args[@]}"; then
log "ERROR: failed to download $PAPER_PROJECT"
Expand Down