mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-22 06:34:21 +00:00
build: add image info properties (#3400)
This commit is contained in:
1 parent
c57760e4b4
commit
5b549c0483
3 files changed
+9
-6
No files matched your search
@@ -33,7 +33,6 @@ jobs:
|
|||||||
- java8-graalvm-ce
|
- java8-graalvm-ce
|
||||||
- java8-openj9
|
- java8-openj9
|
||||||
- java8-jdk
|
- java8-jdk
|
||||||
- java11
|
|
||||||
include:
|
include:
|
||||||
# JAVA 23
|
# JAVA 23
|
||||||
- variant: java23
|
- variant: java23
|
||||||
@@ -75,11 +74,6 @@ jobs:
|
|||||||
baseImage: eclipse-temurin:17-jre-alpine
|
baseImage: eclipse-temurin:17-jre-alpine
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
mcVersion: 1.20.4
|
mcVersion: 1.20.4
|
||||||
# JAVA 11:
|
|
||||||
- variant: java11
|
|
||||||
baseImage: adoptopenjdk:11-jre-hotspot
|
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
|
||||||
mcVersion: 1.16.5
|
|
||||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||||
- variant: java8
|
- variant: java8
|
||||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||||
@@ -207,5 +201,8 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BASE_IMAGE=${{ matrix.baseImage }}
|
BASE_IMAGE=${{ matrix.baseImage }}
|
||||||
BUILD_FILES_REV=${{ steps.build-files-rev.outputs.REV }}
|
BUILD_FILES_REV=${{ steps.build-files-rev.outputs.REV }}
|
||||||
|
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||||
|
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
||||||
|
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||||
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
||||||
@@ -78,3 +78,8 @@ RUN dos2unix /start* /auto/*
|
|||||||
|
|
||||||
ENTRYPOINT [ "/start" ]
|
ENTRYPOINT [ "/start" ]
|
||||||
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
|
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
|
||||||
|
|
||||||
|
ARG BUILDTIME=local
|
||||||
|
ARG VERSION=local
|
||||||
|
ARG REVISION=local
|
||||||
|
RUN echo "buildtime=${BUILDTIME}\nversion=${VERSION}\nrevision=${REVISION}" > /etc/image.properties
|
||||||
@@ -32,6 +32,7 @@ isDebugging && set -x
|
|||||||
export HOME=/data
|
export HOME=/data
|
||||||
|
|
||||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||||
|
log "Image info: $(paste -d, -s /etc/image.properties)"
|
||||||
|
|
||||||
if [ ! -e /data/eula.txt ]; then
|
if [ ! -e /data/eula.txt ]; then
|
||||||
if ! isTrue "$EULA"; then
|
if ! isTrue "$EULA"; then
|
||||||
|
|||||||
Reference in new issue
Block a user