mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Fixed Dockerfile permission issues
This commit is contained in:
parent
9b372f8435
commit
1bc6483608
@ -11,13 +11,15 @@ RUN apt-get update && apt-get --no-install-recommends -y install \
|
|||||||
curl \
|
curl \
|
||||||
unzip
|
unzip
|
||||||
|
|
||||||
RUN groupadd pocketmine && useradd -r -d /pocketmine -p "" -m -g pocketmine -g sudo pocketmine
|
RUN groupadd -g 1000 pocketmine && useradd -r -d /pocketmine -p "" -u 1000 -m -g pocketmine -g sudo pocketmine
|
||||||
|
|
||||||
WORKDIR /pocketmine
|
WORKDIR /pocketmine
|
||||||
RUN chown -R pocketmine:pocketmine .
|
RUN chown -R pocketmine:1000 .
|
||||||
|
|
||||||
USER pocketmine
|
USER pocketmine
|
||||||
RUN echo Sleeping for 5 minutes to wait for Jenkins build && sleep 300
|
ARG WAIT_JENKINS
|
||||||
|
ENV WAIT_JENKINS ${WAIT_JENKINS:-wait}
|
||||||
|
RUN if [ "$WAIT_JENKINS" = "wait" ]; then echo Sleeping for 5 minutes to wait for Jenkins build && sleep 300; fi
|
||||||
|
|
||||||
RUN mkdir tmp
|
RUN mkdir tmp
|
||||||
RUN curl https://update.pmmp.io/api > tmp/api.json
|
RUN curl https://update.pmmp.io/api > tmp/api.json
|
||||||
@ -41,4 +43,4 @@ RUN rm -r tmp
|
|||||||
# RUN sudo mkdir /data /plugins
|
# RUN sudo mkdir /data /plugins
|
||||||
VOLUME ["/data", "/plugins"]
|
VOLUME ["/data", "/plugins"]
|
||||||
# CMD ./start.sh --no-wizard --enable-ansi --data=/data --plugins=/plugins
|
# CMD ./start.sh --no-wizard --enable-ansi --data=/data --plugins=/plugins
|
||||||
CMD sudo chgrp pocketmine /data /plugins -R && sudo chmod g+rw /data /plugins && ./start.sh --no-wizard --enable-ansi --data=/data --plugins=/plugins
|
CMD bash -c 'sudo chown 1000 /data /plugins -R && ./start.sh --no-wizard --enable-ansi --data=/data --plugins=/plugins'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user