Compare commits

...

50 Commits

Author SHA1 Message Date
Geoff Bourne
6e10768e7f ci: test java8 with VERSION=1.16.5 2021-06-20 13:49:02 -05:00
Geoff Bourne
bb47a3705d Auto merge branch with master 2021-06-20 12:46:28 -05:00
Geoff Bourne
c3e1e92547 Auto-merging via docker-versions-create 2021-06-20 12:46:25 -05:00
Geoff Bourne
9ddd768f44 Auto-merging via docker-versions-create 2021-06-05 17:49:30 -05:00
Geoff Bourne
62e1ff8ffa Restored correct ps usage for autopause in Alpine
#897
2021-05-27 08:22:17 -05:00
Geoff Bourne
5f95d135f5 Auto-merging via docker-versions-create 2021-05-24 20:49:44 -05:00
Geoff Bourne
8e32d26b0f Merge branch 'master' into java8 2021-05-23 12:26:33 -05:00
Geoff Bourne
573f064970 Merge from master 2021-05-22 12:58:53 -05:00
Geoff Bourne
0bc6f4075b Auto-merging via docker-versions-create 2021-05-21 23:01:07 -05:00
Geoff Bourne
4ebcc0ef48 Auto-merging via docker-versions-create 2021-05-21 22:47:21 -05:00
Geoff Bourne
57720cf394 Merge branch 'master' into java8 2021-05-21 22:15:35 -05:00
Geoff Bourne
64b2783f19 ci: restored changes for java8 2021-05-21 17:18:57 -05:00
Geoff Bourne
1dbdd7628a Merge branch 'master' into java8 2021-05-21 17:04:24 -05:00
Geoff Bourne
4252ec710f ci: use CACHE_NAME in main.yml 2021-05-21 17:04:11 -05:00
Geoff Bourne
11d455c284 Merge branch 'master' into java8
# Conflicts:
#	Dockerfile
2021-05-21 17:02:17 -05:00
Geoff Bourne
08bc419dc8 Auto-merging via docker-versions-create 2021-05-19 20:27:11 -05:00
Geoff Bourne
67c23017d0 Auto-merging via docker-versions-create 2021-05-19 20:24:31 -05:00
Geoff Bourne
6e1ba3667c Auto-merging via docker-versions-create 2021-05-19 20:18:57 -05:00
Geoff Bourne
0c2f8b903b Auto-merging via docker-versions-create 2021-05-15 12:40:56 -05:00
Geoff Bourne
b9335d9cd6 Auto-merging via docker-versions-create 2021-05-06 20:12:25 -05:00
Geoff Bourne
0d92092b90 Auto-merging via docker-versions-create 2021-04-30 14:27:40 -05:00
Geoff Bourne
e653a41b3f Auto-merging via docker-versions-create 2021-04-30 11:11:19 -05:00
Geoff Bourne
82e63c54c4 Auto-merging via docker-versions-create 2021-04-28 16:50:55 -05:00
Geoff Bourne
f9c573f598 Auto-merging via docker-versions-create 2021-04-26 08:20:41 -05:00
Geoff Bourne
bf8b9cf20d Auto-merging via docker-versions-create 2021-04-24 13:42:07 -05:00
Geoff Bourne
0dd5a412d9 Auto-merging via docker-versions-create 2021-04-23 21:02:46 -05:00
Geoff Bourne
b389561091 Auto-merging via docker-versions-create 2021-04-18 13:29:12 -05:00
Geoff Bourne
6ee055761d Merge branch 'master' into java8 2021-04-11 10:41:32 -05:00
Geoff Bourne
49f9ff645e Auto-merging via docker-versions-create 2021-04-11 10:08:47 -05:00
Geoff Bourne
004cbdb9f7 Auto-merging via docker-versions-create 2021-04-08 19:12:56 -05:00
Geoff Bourne
45856a1a81 Auto-merging via docker-versions-create 2021-04-01 16:30:55 -05:00
Geoff Bourne
1e615e76e8 Merge branch 'master' into java8
# Conflicts:
#	start-configuration
#	start-deployCF
2021-03-18 19:58:16 -05:00
Geoff Bourne
1c85a685de Added support for CF modpacks using settings.cfg
#772 #800
2021-03-14 15:02:40 -05:00
Geoff Bourne
7cd207f40b docs: Added more info about getbukkit's weird 1.8 file naming
#103
2021-03-13 16:54:56 -06:00
Geoff Bourne
140a8aa90c Merge branch 'master' into java8 2021-03-11 19:40:26 -06:00
Geoff Bourne
76dcff9d18 Merge branch 'master' into java8 2021-03-11 17:23:48 -06:00
Geoff Bourne
a9a86d249b Merge branch 'master' into java8
# Conflicts:
#	start-configuration
2021-03-06 16:23:07 -06:00
Geoff Bourne
595760d301 Shifted PATH-fix earlier in startup 2021-03-06 16:04:06 -06:00
Geoff Bourne
6d3f194ce3 Merge from master 2021-02-27 20:47:00 -06:00
Geoff Bourne
21c1620f0c misc: java is actually found in /usr/bin by default 2021-02-11 15:05:45 -06:00
Geoff Bourne
e78e5af96d Fix PATH to include java when needed 2021-02-10 14:49:13 -06:00
Geoff Bourne
0fb9700fc7 Auto-merging via docker-versions-create 2021-02-10 14:01:35 -06:00
Geoff Bourne
18925ef32c Merged latest from master 2021-02-08 21:16:50 -06:00
Geoff Bourne
f06b990f8a Auto-merging via docker-versions-create 2021-02-07 18:03:40 -06:00
Geoff Bourne
75844ae81a Fix java8 base image to actually be Java 8
#753
2021-02-07 11:10:38 -06:00
Geoff Bourne
6bb2323c46 Auto-merging docker-versions-create.sh
CONFLICT (content): Merge conflict in docker-versions-create.sh
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
Automatic merge failed; fix conflicts and then commit the result.
2021-02-07 09:07:30 -06:00
Geoff Bourne
7814ca21b5 Merge branch 'master' into java8
# Conflicts:
#	README.md
#	start-configuration
2021-01-30 18:56:33 -06:00
Geoff Bourne
b8806629ec Merged latest from master 2021-01-30 16:48:11 -06:00
Geoff Bourne
4a7f838a0f Upgraded mainline/latest to Java 11 2021-01-30 16:16:36 -06:00
Geoff Bourne
2d07dee4df Prepared forge branch's Dockerfile 2021-01-30 15:58:03 -06:00
10 changed files with 31 additions and 47 deletions

View File

@@ -41,7 +41,7 @@ jobs:
type=ref,event=tag type=ref,event=tag
type=edge,branch=master type=edge,branch=master
flavor: | flavor: |
latest=true latest=false
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1

View File

@@ -70,5 +70,5 @@ The multiarch images are built and published by [a Github action](https://github
The following git command can be used to provide the bulk of release notes content: The following git command can be used to provide the bulk of release notes content:
```shell script ```shell script
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="- %s" 1.1.0..1.2.0 git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --grep "^build(deps)" --pretty="- %s" 1.1.0..1.2.0
``` ```

View File

@@ -1,29 +1,29 @@
FROM adoptopenjdk:16-jre FROM openjdk:8u212-jre-alpine
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>" LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
RUN apt-get update \ RUN apk add --no-cache -U \
&& DEBIAN_FRONTEND=noninteractive \ openssl \
apt-get install -y \
imagemagick \ imagemagick \
gosu \ lsof \
sudo \ su-exec \
net-tools \ shadow \
curl wget \ bash \
curl iputils wget \
git \ git \
jq \ jq \
dos2unix \
mysql-client \ mysql-client \
tzdata \ tzdata \
rsync \ rsync \
nano \ nano \
unzip \ sudo \
knockd \ knock \
ttf-dejavu \ ttf-dejavu
&& apt-get clean
RUN addgroup --gid 1000 minecraft \ RUN addgroup -g 1000 minecraft \
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft && adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \
&& mkdir -m 777 /data \
&& chown minecraft:minecraft /data /home/minecraft
COPY files/sudoers* /etc/sudoers.d COPY files/sudoers* /etc/sudoers.d
@@ -31,9 +31,9 @@ EXPOSE 25565 25575
# hook into docker BuildKit --platform support # hook into docker BuildKit --platform support
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope # see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETOS ARG TARGETOS=linux
ARG TARGETARCH ARG TARGETARCH=amd64
ARG TARGETVARIANT ARG TARGETVARIANT=""
ARG EASY_ADD_VER=0.7.1 ARG EASY_ADD_VER=0.7.1
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
@@ -69,7 +69,7 @@ WORKDIR /data
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
ENV UID=1000 GID=1000 \ ENV UID=1000 GID=1000 \
MEMORY="1G" \ JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
TYPE=VANILLA VERSION=LATEST \ TYPE=VANILLA VERSION=LATEST \
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \ ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \ SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
@@ -84,6 +84,5 @@ RUN dos2unix /start* && chmod +x /start*
RUN dos2unix /health.sh && chmod +x /health.sh RUN dos2unix /health.sh && chmod +x /health.sh
RUN dos2unix /autopause/* && chmod +x /autopause/*.sh RUN dos2unix /autopause/* && chmod +x /autopause/*.sh
ENTRYPOINT [ "/start" ] ENTRYPOINT [ "/start" ]
HEALTHCHECK --start-period=1m CMD /health.sh HEALTHCHECK --start-period=1m CMD /health.sh

View File

@@ -5,15 +5,15 @@ current_uptime() {
} }
java_running() { java_running() {
[[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] [[ $( ps -a -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
} }
java_process_exists() { java_process_exists() {
[[ -n "$(ps -ax -o comm | grep 'java')" ]] [[ -n "$(ps -a -o comm | grep 'java')" ]]
} }
rcon_client_exists() { rcon_client_exists() {
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]] [[ -n "$(ps -a -o comm | grep 'rcon-cli')" ]]
} }
mc_server_listening() { mc_server_listening() {

View File

@@ -3,10 +3,10 @@
[unpauseMCServer-server] [unpauseMCServer-server]
sequence = 25565 sequence = 25565
seq_timeout = 1 seq_timeout = 1
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh command = /sbin/su-exec minecraft:minecraft /autopause/resume.sh
tcpflags = syn tcpflags = syn
[unpauseMCServer-rcon] [unpauseMCServer-rcon]
sequence = 25575 sequence = 25575
seq_timeout = 1 seq_timeout = 1
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh command = /sbin/su-exec minecraft:minecraft /autopause/resume.sh
tcpflags = syn tcpflags = syn

View File

@@ -2,7 +2,7 @@
. /start-utils . /start-utils
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; then if [[ $( ps -a -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; then
# save world # save world
rcon-cli save-all >/dev/null rcon-cli save-all >/dev/null

View File

@@ -2,7 +2,7 @@
. /start-utils . /start-utils
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then if [[ $( ps -a -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
logAutopauseAction "Knocked, resuming Java process" logAutopauseAction "Knocked, resuming Java process"
pkill -CONT java pkill -CONT java
fi fi

2
start
View File

@@ -40,7 +40,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ $(id -u) = 0 ]; then
echo 'hosts: files dns' > /etc/nsswitch.conf echo 'hosts: files dns' > /etc/nsswitch.conf
fi fi
exec gosu ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration $@ exec su-exec ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration $@
else else
exec ${SCRIPTS:-/}start-configuration $@ exec ${SCRIPTS:-/}start-configuration $@
fi fi

View File

@@ -56,7 +56,7 @@ fi
if ! which java > /dev/null; then if ! which java > /dev/null; then
log "Fixing PATH to include java" log "Fixing PATH to include java"
PATH="${PATH}:/opt/java/openjdk/bin" PATH="${PATH}:/usr/bin"
fi fi
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
@@ -98,12 +98,6 @@ case "${TYPE^^}" in
;; ;;
FORGE) FORGE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
exec ${SCRIPTS:-/}start-deployForge "$@" exec ${SCRIPTS:-/}start-deployForge "$@"
;; ;;
@@ -111,17 +105,7 @@ case "${TYPE^^}" in
exec ${SCRIPTS:-/}start-deployFabric "$@" exec ${SCRIPTS:-/}start-deployFabric "$@"
;; ;;
FTBA)
exec ${SCRIPTS:-/}start-deployFTBA "$@"
;;
FTB|CURSEFORGE) FTB|CURSEFORGE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
exec ${SCRIPTS:-/}start-deployCF "$@" exec ${SCRIPTS:-/}start-deployCF "$@"
;; ;;

View File

@@ -17,4 +17,5 @@ services:
- itzg/minecraft-server:latest - itzg/minecraft-server:latest
environment: environment:
EULA: "TRUE" EULA: "TRUE"
VERSION: "1.16.5"