-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
36 lines (24 loc) · 908 Bytes
/
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
# Use Ubuntu 24.04 LTS as base image
FROM docker.io/library/ubuntu:24.04
ARG DOWNLOAD_URL
# Install necessary packages
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y --no-install-recommends unzip ca-certificates curl tzdata
# Set workdir
WORKDIR /bedrock-server
RUN echo "Downloading from ${DOWNLOAD_URL}"
# download bedrock server
RUN curl -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36" \
-o "bedrock-server-ubuntu.zip" "${DOWNLOAD_URL}"
# Unzip to workdir
RUN unzip bedrock-server-ubuntu.zip && \
rm bedrock-server-ubuntu.zip && \
chmod +x bedrock_server
# Set env path
ENV LD_LIBRARY_PATH=.
CMD ./bedrock_server
# Expose minecraft bedrock port IPv4
EXPOSE 19132/tcp 19132/udp
# Expose minecraft bedrock port IPv6
EXPOSE 19133/tcp 19133/udp
VOLUME /bedrock-server/worlds
SHELL ["/bin/bash"]