Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
clspigot-docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tmueller
clspigot-docker
Commits
50ca9f00
Commit
50ca9f00
authored
4 years ago
by
tmueller
Browse files
Options
Downloads
Patches
Plain Diff
working on switching to nonroot user
parent
031672de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+13
-5
13 additions, 5 deletions
Dockerfile
with
13 additions
and
5 deletions
Dockerfile
+
13
−
5
View file @
50ca9f00
# JRE base
FROM
openjdk:11.0-jre-slim
ARG
user=papermc
# Environment variables
ENV
MC_VERSION="latest" \
PAPER_BUILD="latest" \
MC_RAM="2G" \
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"
ADD
papermc.sh .
ADD
backup.sh .
ADD
restore.sh .
COPY
papermc.sh .
COPY
backup.sh .
COPY
restore.sh .
RUN
apt-get update
\
&&
apt-get
install
wget curl jq webp screen cron
-y
\
&&
rm
-rf
/var/lib/apt/lists/
*
\
&&
mkdir
/papermc
\
&&
mkdir
/backup
&&
mkdir
/backup
\
&&
chmod
+x papermc.sh
\
&&
chmod
+x backup.sh
\
&&
chmod
+x restore.sh
RUN
chown
-R
${
user
}
/papermc
RUN
chown
-R
${
user
}
/backup
RUN
groupadd
-r
mcuser
&&
adduser mcuser
USER
mcuser
# Start script
...
...
@@ -23,6 +32,5 @@ CMD ["sh", "./papermc.sh"]
# Container setup
EXPOSE
25565/tcp
EXPOSE
25565/udp
EXPOSE
8123/tcp
VOLUME
/papermc
VOLUME
/backup
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment