vericudebuget commited on
Commit
97127d2
·
verified ·
1 Parent(s): 8b434a4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -7
Dockerfile CHANGED
@@ -1,17 +1,22 @@
1
  FROM ubuntu:24.04
2
 
3
- # Install required packages (Java, wget, python, screen) + add playit.gg repo and install playit
 
4
  RUN apt-get update && \
5
- apt-get install -y openjdk-21-jre-headless wget python3 screen gpg curl python3-pip && \
 
 
 
 
 
 
 
6
  curl -SsL https://playit-cloud.github.io/ppa/key.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/playit.gpg >/dev/null && \
7
  echo "deb [signed-by=/etc/apt/trusted.gpg.d/playit.gpg] https://playit-cloud.github.io/ppa/data ./" | tee /etc/apt/sources.list.d/playit-cloud.list && \
8
  apt-get update && \
9
  apt-get install -y playit && \
10
  rm -rf /var/lib/apt/lists/*
11
 
12
- # Install Python websockets library
13
- RUN pip3 install websockets
14
-
15
  # Create Minecraft directory and download server JAR
16
  RUN mkdir -p /opt/minecraft && \
17
  wget -O /opt/minecraft/server.jar https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar
@@ -33,5 +38,4 @@ RUN chown -R 1000:1000 /opt/minecraft
33
  # Expose the web interface port
34
  EXPOSE 7860
35
 
36
- # Run the start script, which now launches our python server
37
- CMD ["/opt/minecraft/start.sh"]
 
1
  FROM ubuntu:24.04
2
 
3
+ # Install required packages (Java, wget, python, etc.) using apt
4
+ # We install python3-websockets directly from apt instead of using pip
5
  RUN apt-get update && \
6
+ apt-get install -y \
7
+ openjdk-21-jre-headless \
8
+ wget \
9
+ python3 \
10
+ screen \
11
+ gpg \
12
+ curl \
13
+ python3-websockets && \
14
  curl -SsL https://playit-cloud.github.io/ppa/key.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/playit.gpg >/dev/null && \
15
  echo "deb [signed-by=/etc/apt/trusted.gpg.d/playit.gpg] https://playit-cloud.github.io/ppa/data ./" | tee /etc/apt/sources.list.d/playit-cloud.list && \
16
  apt-get update && \
17
  apt-get install -y playit && \
18
  rm -rf /var/lib/apt/lists/*
19
 
 
 
 
20
  # Create Minecraft directory and download server JAR
21
  RUN mkdir -p /opt/minecraft && \
22
  wget -O /opt/minecraft/server.jar https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar
 
38
  # Expose the web interface port
39
  EXPOSE 7860
40
 
41
+ # Run the start script, which now launches