Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (49 sloc) 1.71 KB
# Before building this, you must agree to the Minecraft EULA:
FROM ubuntu:trusty
MAINTAINER Kyle Lemons <>
# Install MSM dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
screen \
rsync \
zip \
wget \
openjdk-7-jre \
&& rm -rf /var/lib/apt/lists/*
# Add the minecraft user
RUN useradd \
--comment "minecraft user" \
--home /msm \
--create-home \
--shell /sbin/nologin \
# Add the default config file
ADD config/msm.conf /etc/msm.conf
# Add the msm "binary" and update
ADD /bin/msm
RUN chmod 0755 /bin/msm
RUN /bin/msm update --noinput
RUN /bin/msm jargroup create minecraft \
# Create a default server
RUN /bin/msm server create main
RUN echo "msm-version=minecraft/1.3.0" >> /msm/servers/main/
RUN echo "motd=Docker Minecraft Server" >> /msm/servers/main/
RUN echo "eula=true" >> /msm/servers/main/eula.txt
RUN /bin/msm main start && sleep 10 && /bin/msm stop
RUN mv /msm/servers/main/world /msm/servers/main/worldstorage/
RUN /bin/msm main worlds load
# Add msm crontab
ADD /msm/crontab
# Set ownership
RUN chown -R minecraft: /msm
# Copy /msm into /defaults for easy population of volumes
RUN mkdir -p /defaults
RUN rsync -avz /msm/ /defaults/msm
VOLUME ["/msm", "/ram"]
# Add the default command
ADD scripts/ /bin/
CMD ["/bin/"]
# Expose the minecraft port
EXPOSE 25565