-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinux-bedrock.Dockerfile
49 lines (34 loc) · 1.69 KB
/
linux-bedrock.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
41
42
43
44
45
46
47
48
49
# escape=`
FROM lacledeslan/steamcmd:linux as DOWNLOADER
RUN DOWNLOAD_URL=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -s -L -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BEDROCK-UPDATER)" https://minecraft.net/en-us/download/server/bedrock/ | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*') `
&& wget $DOWNLOAD_URL -O /output/bedrock-server.zip `
&& unzip /output/bedrock-server.zip -d /output `
&& rm -rf /output/bedrock-server.zip
FROM debian:bullseye-slim
ARG BUILDNODE=unspecified
ARG SOURCE_COMMIT=unspecified
HEALTHCHECK NONE
RUN apt-get update && apt-get install -y `
libcurl4 locales locales-all tmux &&`
apt-get clean &&`
echo "LC_ALL=en_US.UTF-8" >> /etc/environment &&`
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*;
ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
ENV LD_LIBRARY_PATH=/app
LABEL com.lacledeslan.build-node=$BUILDNODE `
org.label-schema.schema-version="1.0" `
org.label-schema.url="https://github.com/LacledesLAN/README.1ST" `
org.label-schema.vcs-ref=$SOURCE_COMMIT `
org.label-schema.vendor="Laclede's LAN" `
org.label-schema.description="Minecraft (Bedrock) Dedicated Server in Docker" `
org.label-schema.vcs-url="https://github.com/LacledesLAN/gamesvr-minecraft"
# Set up Enviornment
RUN useradd --home /app --gid root --system Minecraft &&`
mkdir --parents /app &&`
chown Minecraft:root -R /app;
COPY --chown=Minecraft:root ./dist/linux/ll-tests/gamesvr-bedrock-minecraft.sh /app/ll-tests/gamesvr-bedrock-minecraft.sh
RUN chmod +x /app/ll-tests/*.sh;
COPY --chown=Minecraft:root --from=DOWNLOADER /output/ /app/
USER Minecraft
WORKDIR /app
ONBUILD USER root