Updated papermc
This commit is contained in:
parent
6f40029a9c
commit
7ac4f82a85
3 changed files with 25 additions and 18 deletions
|
|
@ -21,23 +21,26 @@ ARG MC_VERSION
|
|||
ARG PAPERMC_VERSION
|
||||
|
||||
# Create worlds and config directory
|
||||
WORKDIR /mc
|
||||
WORKDIR /app
|
||||
RUN mkdir worlds config
|
||||
|
||||
# Download server file
|
||||
ADD "https://papermc.io/api/v1/paper/$MC_VERSION/$PAPERMC_VERSION/download" server.jar
|
||||
|
||||
# Store the cache in an anonymous volume, which means it won't get stored in the other volumes
|
||||
VOLUME /mc/config/cache
|
||||
VOLUME /app/config/cache
|
||||
|
||||
WORKDIR /mc/config
|
||||
WORKDIR /app/config
|
||||
|
||||
# Default value to keep users from eating up all ram accidentally
|
||||
ENV XMS=4
|
||||
|
||||
# Document exposed ports
|
||||
EXPOSE 25565
|
||||
|
||||
# We copy over the server jar(s) as well to make the backup more reproducible to deploy
|
||||
ENTRYPOINT mv -n /mc/*.jar /mc/config && \
|
||||
echo "eula=true" > /mc/config/eula.txt && \
|
||||
ENTRYPOINT mv -n /app/*.jar /app/config && \
|
||||
echo "eula=true" > /app/config/eula.txt && \
|
||||
java \
|
||||
-Xms"${XMS}G" \
|
||||
-Xmx"${XMX:-$XMS}G" \
|
||||
|
|
@ -61,6 +64,6 @@ java \
|
|||
-XX:MaxTenuringThreshold=1 \
|
||||
-Dusing.aikars.flags=https://mcflags.emc.gs \
|
||||
-Daikars.new.flags=true \
|
||||
-jar /mc/server.jar \
|
||||
--universe /mc/worlds \
|
||||
-jar /app/server.jar \
|
||||
--universe /app/worlds \
|
||||
--nogui
|
||||
|
|
|
|||
Reference in a new issue