Compare commits

..

16 Commits

Author SHA1 Message Date
Geoff Bourne bfdb5c075b Auto-merging via docker-versions-create 2020-06-19 13:26:45 -05:00
Geoff Bourne bd4a184ad7 Auto-merging via docker-versions-create 2020-05-20 08:14:52 -05:00
Geoff Bourne 156786dacf Auto-merging via docker-versions-create 2020-05-02 09:34:17 -05:00
Geoff Bourne 92186c9c8e Auto-merging via docker-versions-create 2020-04-25 12:10:54 -05:00
Geoff Bourne 74ee8a621c Auto-merging via docker-versions-create 2020-04-17 21:28:57 -05:00
Geoff Bourne 64345b0d82 Auto-merging via docker-versions-create 2020-04-11 08:51:46 -05:00
Geoff Bourne 5b45c4ea4e Auto-merging via docker-versions-create 2020-04-10 11:08:53 -05:00
Geoff Bourne a15e608421 Auto-merging via docker-versions-create 2020-04-03 13:31:40 -05:00
Geoff Bourne f4561b7a3b Auto-merging via docker-versions-create 2020-04-03 13:28:52 -05:00
Geoff Bourne c6f0042686 Auto-merging via docker-versions-create 2020-04-02 17:47:41 -05:00
Geoff Bourne 79aabf82ff Auto-merging via docker-versions-create 2020-03-30 08:32:02 -05:00
Geoff Bourne 89b60c7706 Auto-merging via docker-versions-create 2020-03-26 20:54:13 -05:00
Geoff Bourne 4b4cbdfce1 Auto-merging via docker-versions-create 2020-02-01 08:53:03 -06:00
Geoff Bourne a424346d0c Auto-merging via docker-versions-create 2020-01-17 08:29:12 -06:00
Geoff Bourne fad48505d7 Auto-merging via docker-versions-create 2019-11-16 09:31:01 -06:00
Geoff Bourne a535fb7873 Add adoptopenjdk/openjdk11:alpine-jre variant 2019-11-16 09:09:55 -06:00
9 changed files with 12 additions and 111 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions # This is a basic workflow to help you get started with Actions
name: Build and publish non-multiarch branches/tags name: Build non-multiarch branches/tags
on: on:
push: push:
@@ -36,4 +36,4 @@ jobs:
tag_with_sha: true tag_with_sha: true
cache_froms: itzg/minecraft-server:latest cache_froms: itzg/minecraft-server:latest
add_git_labels: true add_git_labels: true
push: true push: false
+1 -47
View File
@@ -1,17 +1,4 @@
## Adding a server type Individual scripts can be iteratively developed and tested using the following procedure.
Adding a new server `TYPE` can vary due to the complexity of obtaining and configuring each type; however, the addition of any server type includes at least the following steps:
1. Copy an existing "start-deploy*" script, such as [start-deployMohist](start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix
2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-finalSetup01World` at the end of the script
3. Develop and test the changes using the [iterative process described below](#iterative-script-development)
4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](start-configuration)
5. Add a section to the [README](README.md). It is recommended to copy-modify an existing section to retain a similar wording and level of detail
6. [Submit a pull request](https://github.com/itzg/docker-minecraft-server/pulls)
## Iterative script development
Individual scripts can be iteratively developed, debugged, and tested using the following procedure.
First, build a baseline of the image to include the packages needed by existing or new scripts: First, build a baseline of the image to include the packages needed by existing or new scripts:
@@ -39,36 +26,3 @@ VANILLA_VERSION=1.12.2 /scripts/start-magma
``` ```
> NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing. > NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
## Multi-base-image variants
Several base-image variants are maintained in order to offer choices in JDK provider and version. The variants are maintained in their respective branches:
- openj9
- openj9-nightly
- adopt11
- adopt13
- multiarch
The [docker-versions-create.sh](docker-versions-create.sh) script is configured with the branches to maintain and is used to merge changes from the master branch into the mulit-base variant branches. The script also manages git tagging the master branch along with the merged branches. So a typical use of the script would be like:
```shell script
./docker-versions-create.sh -s -t 1.2.0
```
> Most often the major version will be bumped unless a bug or hotfix needs to be published in which case the patch version should be incremented.
> The build and publishing of those branches and their tags is currently performed within Docker Hub.
## multiarch support
The [multiarch branch](https://github.com/itzg/docker-minecraft-server/tree/multiarch) supports running the image on amd64, arm64, and armv7 (aka RaspberryPi). Unlike the mainline branches, it is based on Ubuntu 18.04 since the openjdk package provided by Ubuntu includes full JIT support on all of the processor types.
The multiarch images are built and published by [a Github action](https://github.com/itzg/docker-minecraft-server/actions?query=workflow%3A%22Build+and+publish+multiarch%22), which [is configured in that branch](https://github.com/itzg/docker-minecraft-server/blob/multiarch/.github/workflows/build-multiarch.yml).
## Generating release notes
The following git command can be used to provide the bulk of release notes content:
```shell script
git log --invert-grep --grep "^ci:" --grep "^misc:" --pretty="- %s" 1.1.0..1.2.0
```
+2 -2
View File
@@ -1,4 +1,4 @@
FROM adoptopenjdk/openjdk13:alpine-jre FROM adoptopenjdk/openjdk11:alpine-jre
LABEL maintainer "itzg" LABEL maintainer "itzg"
@@ -67,7 +67,7 @@ COPY log4j2.xml /tmp/log4j2.xml
WORKDIR /data WORKDIR /data
ENV UID=1000 GID=1000 \ ENV UID=1000 GID=1000 \
MEMORY="1G" \ JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \ TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \ PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \ LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
-9
View File
@@ -534,15 +534,6 @@ A [Mohist](https://github.com/Mohist-Community/Mohist) server can be used with
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2" > **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
## Running a Catserver type server
A [Catserver](http://catserver.moe/) type server can be used with
-e TYPE=CATSERVER
> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored
## Running a server with a Feed the Beast modpack ## Running a server with a Feed the Beast modpack
> **NOTE** requires `itzg/minecraft-server:multiarch` image > **NOTE** requires `itzg/minecraft-server:multiarch` image
+1 -5
View File
@@ -10,7 +10,7 @@ function TrapExit {
batchMode=false batchMode=false
while getopts "hbt:s" arg while getopts "hbt:" arg
do do
case $arg in case $arg in
b) b)
@@ -19,9 +19,6 @@ do
t) t)
tag=${OPTARG} tag=${OPTARG}
;; ;;
s)
tagArgs="-s -m 'Signed during docker-versions-create"
;;
h) h)
echo " echo "
Usage $0 [options] Usage $0 [options]
@@ -31,7 +28,6 @@ Options:
when any merge fails when any merge fails
-t TAG tag and push the current revision on master with the given tag -t TAG tag and push the current revision on master with the given tag
and apply respective tags to each branch and apply respective tags to each branch
-s enable signed tags
-h display this help and exit -h display this help and exit
" "
exit exit
+2 -7
View File
@@ -40,7 +40,6 @@ rm /data/.verify_access || true
if [[ $PROXY ]]; then if [[ $PROXY ]]; then
export http_proxy="$PROXY" export http_proxy="$PROXY"
export https_proxy="$PROXY" export https_proxy="$PROXY"
export JAVA_TOOL_OPTIONS+="-Djava.net.useSystemProxies=true"
log "INFO: Giving proxy time to startup..." log "INFO: Giving proxy time to startup..."
sleep 5 sleep 5
fi fi
@@ -116,15 +115,11 @@ case "${TYPE^^}" in
;; ;;
MAGMA) MAGMA)
exec ${SCRIPTS:-/}start-deployMagma "$@" exec ${SCRIPTS:-/}start-magma "$@"
;; ;;
MOHIST) MOHIST)
exec ${SCRIPTS:-/}start-deployMohist "$@" exec ${SCRIPTS:-/}start-mohist "$@"
;;
CATSERVER)
exec ${SCRIPTS:-/}start-deployCatserver "$@"
;; ;;
*) *)
-32
View File
@@ -1,32 +0,0 @@
#!/bin/bash
. ${SCRIPTS:-/}start-utils
set -o pipefail
set -e
latestAsset=$(
curl -fsSL https://api.github.com/repos/Luohuayu/CatServer/releases/latest | \
jq '.assets[] | select(.name | match(".*-universal.jar"))'
)
if [[ -z "${latestAsset}" ]]; then
log "ERROR: latest release of Catserver is missing universal.jar asset"
exit 1
fi
isDebugging && log "Latest asset ${latestAsset}"
latestJarName=$(echo ${latestAsset} | jq --raw-output '.name')
latestJarId=$(echo ${latestAsset} | jq --raw-output '.id')
export SERVER="/data/${latestJarName}"
if [ ! -f ${SERVER} ]; then
log "Downloading ${latestJarName}"
curl -H "Accept:application/octet-stream" -o "$SERVER" -fsSL https://api.github.com/repos/Luohuayu/CatServer/releases/assets/${latestJarId}
fi
export SKIP_LOG4J_CONFIG=true
# Continue to Final Setup
exec ${SCRIPTS:-/}start-finalSetup01World "$@"
View File
+3 -6
View File
@@ -1,19 +1,17 @@
#!/bin/bash #!/bin/bash
. ${SCRIPTS:-/}start-utils . ${SCRIPTS:-/}start-utils
requireVar VANILLA_VERSION
set -o pipefail set -o pipefail
set -e set -e
isDebugging && set -x isDebugging && set -x
requireVar VANILLA_VERSION
mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/ mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/
mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/ mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/
if ! curl -X HEAD -o /dev/null -fsSL "${mohistJob}"; then if ! curl -X HEAD -o /dev/null -fsSL "${mohistJob}"; then
log "ERROR: mohist builds do not exist for ${VANILLA_VERSION}" log "ERROR: mohist builds do not exist for ${VANILLA_VERSION}"
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions" log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
log " and set VERSION accordingly"
exit 1 exit 1
fi fi
@@ -26,18 +24,17 @@ baseName=$(basename "${latestBuildRelPath}")
if [[ ${baseName} != *-server.jar* ]]; then if [[ ${baseName} != *-server.jar* ]]; then
log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}" log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}"
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions" log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
log " and set VERSION accordingly"
exit 1 exit 1
fi fi
export SERVER="/data/${baseName}" export SERVER="/data/${baseName}"
if [ ! -f ${SERVER} ]; then if [ ! -f ${SERVER} ]; then
log "Downloading ${baseName}" log "Downloading ${SERVER}"
curl -o "${SERVER}" -fsSL "${mohistJob}lastSuccessfulBuild/artifact/${latestBuildRelPath}" curl -o "${SERVER}" -fsSL "${mohistJob}lastSuccessfulBuild/artifact/${latestBuildRelPath}"
fi fi
export SKIP_LOG4J_CONFIG=true export SKIP_LOG4J_CONFIG=true
# Continue to Final Setup # Continue to Final Setup
exec ${SCRIPTS:-/}start-finalSetup01World "$@" exec ${SCRIPTS:-/}start-finalSetup01World $@