-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.amd64
More file actions
55 lines (39 loc) · 1.6 KB
/
Dockerfile.amd64
File metadata and controls
55 lines (39 loc) · 1.6 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM debian:jessie
MAINTAINER Erik Kellener [erik@kellener.com]
# apt netatalk
# Add Java 8
RUN apt-get remove openjdk*
RUN apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list
RUN echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list
RUN apt-get -y update && apt-get -y upgrade
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
RUN apt-get install -y oracle-java8-installer
RUN apt-get install -y oracle-java8-set-default
RUN apt-get -y install git screen avahi-daemon wget
RUN mkdir /data && cd /data
# Copy built jars from previous dockerfile
WORKDIR /
COPY *.jar /data/
WORKDIR /data
#For debugging
#RUN apt-get install nano
#RUN mkdir -p /data/config
COPY minecraft.sh /data/minecraft.sh
COPY spigot.yml /data/spigot.yml
# script that finds UUID (used to populate ops.json
COPY lookupuuid.sh /data/lookupuuid.sh
RUN chmod +x /data/minecraft.sh
#Update /etc/rc.local and add su -l pi -c /data/minecraft.sh
RUN echo "su -l -c /data/minecraft.sh" >> /etc/rc.local
#If not already set up
#edit /etc/default/tmpfs ensure RAMTMP=yes
ENV PATH="/:${PATH}"
#Other default port is (25565) Ensure this is open
EXPOSE 25565/tcp
# Start the service
ENTRYPOINT ["/bin/bash","minecraft.sh"]
#Reference
#https://www.dropbox.com/install-linux
#http://lemire.me/blog/2016/04/02/setting-up-a-robust-minecraft-server-on-a-raspberry-pi/