-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (31 loc) · 1.1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM java:8-jre
MAINTAINER TCJ Design instead of Jonas Bonno Mikkelsen (https://github.com/JonasBonno)
# Updating container
RUN apt-get update && \
apt-get upgrade --yes --force-yes && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Setting workdir
WORKDIR /minecraft
# Changing user to root
USER root
# Creating user and downloading files
RUN useradd -m -U minecraft && \
mkdir -p /minecraft/world && \
wget --no-check-certificate https://media.forgecdn.net/files/2570/159/FTBRevelation-2.0.0-1.12.2.zip && \
unzip FTBRevelation-2.0.0-1.12.2.zip && \
rm FTBRevelation-2.0.0-1.12.2.zip && \
chmod u+x FTBInstall.sh ServerStart.sh && \
echo "#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)." > eula.txt && \
echo "$(date)" >> eula.txt && \
echo "eula=TRUE" >> eula.txt && \
chown -R minecraft:minecraft /minecraft
USER minecraft
# Running install
RUN /minecraft/FTBInstall.sh
# Expose port 25565
EXPOSE 25565
# Expose volume
VOLUME ["/minecraft/world"]
# Start server
CMD ["/bin/bash", "/minecraft/ServerStart.sh"]