misukisu commited on
Commit
d5e6b43
·
verified ·
1 Parent(s): 694e3f6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -13
Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM ubuntu:22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # Install curl, unzip, python3, and Bedrock dependencies
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  curl \
8
  unzip \
@@ -12,25 +12,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
12
  libssl3 \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Download playit-cli standalone binary
16
  RUN curl -Lo /usr/local/bin/playit https://github.com/playit-cloud/playit-agent/releases/latest/download/playit-linux-amd64 \
17
  && chmod +x /usr/local/bin/playit
18
 
19
  WORKDIR /bedrock
20
 
21
- # Download latest official Bedrock Dedicated Server (BDS)
22
- RUN USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64)" \
23
- && BDS_URL=$(curl -s -H "User-Agent: $USER_AGENT" https://www.minecraft.net/en-us/download/server/bedrock | grep -o 'https://minecraft.azureedge.net/bin-linux/bedrock-server-[0-9\.]*\.zip' | head -n 1) \
24
- && echo "Downloading from: $BDS_URL" \
25
- && curl -H "User-Agent: $USER_AGENT" -Lo bedrock-server.zip "$BDS_URL" \
26
- && unzip bedrock-server.zip \
27
- && rm bedrock-server.zip \
28
- && chmod +x bedrock_server
29
-
30
- # Copy startup scripts and web console
31
  COPY app.py /bedrock/app.py
32
  COPY start.sh /bedrock/start.sh
33
- RUN chmod +x /bedrock/start.sh
 
 
34
 
35
  EXPOSE 7860
36
 
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Install curl, unzip, python3, and required Bedrock runtime libraries
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  curl \
8
  unzip \
 
12
  libssl3 \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Download playit-cli
16
  RUN curl -Lo /usr/local/bin/playit https://github.com/playit-cloud/playit-agent/releases/latest/download/playit-linux-amd64 \
17
  && chmod +x /usr/local/bin/playit
18
 
19
  WORKDIR /bedrock
20
 
21
+ # Copy helper scripts
22
+ COPY download_bedrock.py /bedrock/download_bedrock.py
 
 
 
 
 
 
 
 
23
  COPY app.py /bedrock/app.py
24
  COPY start.sh /bedrock/start.sh
25
+
26
+ # Download and extract the latest Bedrock Dedicated Server
27
+ RUN python3 /bedrock/download_bedrock.py && chmod +x /bedrock/bedrock_server /bedrock/start.sh
28
 
29
  EXPOSE 7860
30