Skip to content

Instantly share code, notes, and snippets.

@SOF3
Last active March 23, 2019 03:28
Show Gist options
  • Save SOF3/657d37cbf83c3d04d907776634ce2f26 to your computer and use it in GitHub Desktop.
Save SOF3/657d37cbf83c3d04d907776634ce2f26 to your computer and use it in GitHub Desktop.
FROM ubuntu:bionic
MAINTAINER PMMP Team <team@pmmp.io>
EXPOSE 19132/tcp
EXPOSE 19132/udp
RUN apt-get update && apt-get --no-install-recommends -y install \
sudo \
ca-certificates \
jq \
curl \
unzip
RUN groupadd -g 1000 pocketmine && useradd -r -d /pocketmine -p "" -u 1000 -m -g pocketmine -g sudo pocketmine
WORKDIR /pocketmine
ADD bin /pocketmine/bin
ADD PocketMine-MP.phar /pocketmine/PocketMine-MP.phar
ADD start.sh /pocketmine/start.sh
RUN chown -R pocketmine:1000 .
USER pocketmine
RUN chmod +x bin/php7/bin/php start.sh
# RUN sudo mkdir /data /plugins
VOLUME ["/data", "/plugins"]
# CMD ./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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment