@@ -7,6 +7,8 @@ RUN yum install git && \
7
7
java -jar BuildTools.jar -rev $SPIGOT_VERSION
8
8
9
9
FROM kriation/centos7-jre8 as spigot-config
10
+ LABEL maintainer=
"[email protected] "
11
+ ARG BUILD_DATE
10
12
ARG SPIGOT_VERSION=latest
11
13
ARG MC_EULA=false
12
14
ARG MC_SERVER_MEM=1024M
@@ -16,6 +18,16 @@ ARG MC_SERVER_QUERY_PORT=25565
16
18
ARG MC_SERVER_RCON=false
17
19
ARG MC_SERVER_RCON_PORT=25567
18
20
ARG MC_SERVER_RCON_PASS
21
+ ARG JMX_ON=false
22
+ ARG JMX_PORT=9000
23
+ LABEL org.label-schema.build-date=$BUILD_DATE \
24
+ org.label-schema.name="CentOS v7 with Spigot" \
25
+ org.label-schema.version=$SPIGOT_VERSION \
26
+ org.label-schema.url="https://github.com/kriation/docker-spigot" \
27
+ org.opencontainers.image.created=$BUILD_DATE \
28
+ org.opencontainers.image.title="CentOS v7 with Spigot" \
29
+ org.opencontainers.image.version=$SPIGOT_VERSION \
30
+ org.opencontainers.iamge.url="https://github.com/kriation/docker-spigot"
19
31
ENV SPIGOT_VERSION=${SPIGOT_VERSION:-latest} \
20
32
MC_SERVER_MEM=${MC_SERVER_MEM:-1024M} \
21
33
MC_SERVER_PORT=${MC_SERVER_PORT:-25565} \
@@ -24,11 +36,9 @@ ENV SPIGOT_VERSION=${SPIGOT_VERSION:-latest} \
24
36
MC_SERVER_RCON=${MC_SERVER_RCON:-false} \
25
37
MC_SERVER_RCON_PORT=${MC_SERVER_RCON_PORT:-25567} \
26
38
MC_SERVER_RCON_PASS=${MC_SERVER_RCON_PASS} \
27
- MC_EULA=${MC_EULA:-false}
28
- LABEL build-date="" \
29
- license="" \
30
- name="Spigot-$SPIGOT_VERSION" \
31
- vendor=""
39
+ MC_EULA=${MC_EULA:-false} \
40
+ JMX_ON=${JMX_ON:-false} \
41
+ JMX_PORT=${JXM_PORT:-9000}
32
42
WORKDIR /opt/spigot
33
43
COPY --from=spigot-builder /tmp/spigot/spigot*.jar /tmp/spigot-$SPIGOT_VERSION.jar
34
44
COPY config/* /opt/spigot/
@@ -42,11 +52,11 @@ RUN sed -i 's/\(server-port=\)[[:print:]]*/\1'"$MC_SERVER_PORT"'/g' server.prope
42
52
sed -i 's/\( query.port=\) [[:print:]]*/\1 ' "$MC_SERVER_QUERY_PORT" '/g' server.properties && \
43
53
sed -i 's/\( rcon.port=\) [[:print:]]*/\1 ' "$MC_SERVER_RCON_PORT" '/g' server.properties && \
44
54
sed -i 's/\( rcon.password=\) [[:print:]]*/\1 ' "$MC_SERVER_RCON_PASS" '/g' server.properties
45
- EXPOSE $MC_SERVER_PORT $MC_SERVER_QUERY_PORT $MC_SERVER_RCON_PORT
55
+ EXPOSE $MC_SERVER_PORT $MC_SERVER_QUERY_PORT $MC_SERVER_RCON_PORT $JMX_PORT
46
56
VOLUME /opt/spigot
47
57
ENTRYPOINT /usr/bin/java -Xms$MC_SERVER_MEM -Xmx$MC_SERVER_MEM -XX:+UseG1GC \
48
- -Dcom.sun.management.jmxremote \
49
- -Dcom.sun.management.jmxremote.port=9000 \
58
+ -Dcom.sun.management.jmxremote=$JMX_ON \
59
+ -Dcom.sun.management.jmxremote.port=$JMX_PORT \
50
60
-Dcom.sun.management.jmxremote.local.only=false \
51
61
-Dcom.sun.management.jmxremote.authenticate=false \
52
62
-Dcom.sun.management.jmxremote.ssl=false \
0 commit comments