Skip to content
Snippets Groups Projects
Commit f055883f authored by TheBroTMv2's avatar TheBroTMv2
Browse files

minimise buildtime

fix missing \ in ENV to avoid mulitple containers while building it. Also add this to some RUN instructions to minimise buildtime
parent 1b21e265
No related branches found
No related tags found
1 merge request!7Beta
Pipeline #2657 failed
......@@ -24,8 +24,8 @@ ENV MC_VERSION="latest" \
JAVA_OPTS="-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true" \
#Man kann nun auch die guid des eigenen benutzers passen und mus somit nichtmehr die rechte des hostsystems anpassen, bitte die GUID eines non-root users nehmen der an dem speicherort zugriff hat.
GUID=61000 \
TZ=Europe/Berlin
TM_BASE_AUTH="tmueller:supercooles_passwort_hier_einfuegen"
TZ=Europe/Berlin \
TM_BASE_AUTH="tmueller:supercooles_passwort_hier_einfuegen" \
TM_BASE_URL="https://tobistechblog.de/uni/initial.tar.gz"
# Copy over the three script files (entrypoint, backup, restore, helath, test(optional) and crontab
COPY papermc.sh /
......@@ -47,10 +47,10 @@ RUN chmod 0644 /etc/cron.d/backup
# Add papermc user and group, then change ownership of /papermc and /backup to this user
RUN groupadd -g ${GUID} ${papermc_group}
RUN useradd -g ${GUID} -l -M -s /bin/false -u ${GUID} ${papermc_user}
RUN chown -R ${GUID} /papermc/
RUN chown -R ${GUID} /backup/
RUN groupadd -g ${GUID} ${papermc_group} \
useradd -g ${GUID} -l -M -s /bin/false -u ${GUID} ${papermc_user} \
chown -R ${GUID} /papermc/ \
chown -R ${GUID} /backup/
# Get package lists, install needed packages, then remove the package lists again (to save space)
# "webp" is needed to generate images with better compression for the dynamic map (optional, needs further configuration in dynmap-plugin´s config file)
......@@ -64,8 +64,8 @@ RUN apt-get update && apt-get install -y \
screen \
webp \
nano \
&& rm -rf /var/lib/apt/lists/*
RUN service cron start
&& rm -rf /var/lib/apt/lists/* \
service cron start
# Execute all following commands as the papermc user
USER $papermc_user
......
......@@ -145,6 +145,10 @@ In diesem Fall stürzt der Minecraft-Server immer wieder ab und wird direkt dana
## :books: Weitere Ressourcen
In kürze verfügbar:
- [Read the Docs] (https://gitlab.cl.uni-heidelberg.de/tmueller/clspigot-docker/-/blob/beta/docs/user.md)
Projektsites des ursprünglichen Images von Phyremaster:
- [GitHub](https://github.com/Phyremaster/papermc-docker)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment