mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
Avoid touch since rpi mounts default to noatime
This commit is contained in:
parent
9c7c95cf4f
commit
ec7d182d38
2 changed files with 5 additions and 13 deletions
|
@ -1,10 +1,11 @@
|
|||
FROM arm32v7/adoptopenjdk:11-jre-hotspot
|
||||
FROM ubuntu:20.04
|
||||
|
||||
LABEL maintainer "itzg"
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
openjdk-8-jre \
|
||||
openssl \
|
||||
imagemagick \
|
||||
lsof \
|
||||
|
@ -23,9 +24,7 @@ RUN apt-get update \
|
|||
HEALTHCHECK --start-period=1m CMD mc-monitor status --host localhost --port $SERVER_PORT
|
||||
|
||||
RUN addgroup --gid 1000 minecraft \
|
||||
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /home/minecraft minecraft \
|
||||
&& mkdir -m 777 /data \
|
||||
&& chown minecraft:minecraft /data /home/minecraft
|
||||
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@ shopt -s nullglob
|
|||
#umask 002
|
||||
export HOME=/data
|
||||
|
||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
|
||||
if [ ! -e /data/eula.txt ]; then
|
||||
EULA="${EULA,,}"
|
||||
if [ "$EULA" != "true" ]; then
|
||||
|
@ -28,15 +30,6 @@ if [ ! -e /data/eula.txt ]; then
|
|||
fi
|
||||
|
||||
|
||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
|
||||
if ! touch /data/.verify_access; then
|
||||
log "ERROR: /data doesn't seem to be writable. Please make sure attached directory is writable by uid=$(id -u)"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
rm /data/.verify_access || true
|
||||
|
||||
if [[ $PROXY ]]; then
|
||||
export http_proxy="$PROXY"
|
||||
export https_proxy="$PROXY"
|
||||
|
|
Loading…
Reference in a new issue