Skip to content

Instantly share code, notes, and snippets.

@mikan-megane
Last active January 23, 2024 10:11
Show Gist options
  • Save mikan-megane/b69cd9ac51c6b63e4bf637118c4c45aa to your computer and use it in GitHub Desktop.
Save mikan-megane/b69cd9ac51c6b63e4bf637118c4c45aa to your computer and use it in GitHub Desktop.
AArch64環境のDockerでPalworld専用サーバーを立てるためのDockerファイル
FROM debian:bullseye-slim as build
ENV DEBIAN_FRONTEND="noninteractive"
# Install libraries needed to compile box
RUN dpkg --add-architecture armhf \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests git wget curl cmake python3 build-essential gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libc6:armhf libstdc++6:armhf ca-certificates
WORKDIR /root
# Build box86
RUN git clone https://github.com/ptitSeb/box86 \
&& mkdir box86/build \
&& cd box86/build \
&& cmake .. -DRPI4ARM64=1 -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
&& make -j$(nproc) \
&& make install DESTDIR=/box
# Build box64
RUN git clone https://github.com/ptitSeb/box64 \
&& mkdir box64/build \
&& cd box64/build \
&& cmake .. -DRPI4ARM64=1 -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
&& make -j$(nproc) \
&& make install DESTDIR=/box
FROM debian:bullseye-slim
# Copy compiled box86 and box64 binaries
COPY --from=build /box /
# Install libraries needed to run box
ARG DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture armhf \
&& apt-get update \
&& apt-get install --yes --no-install-recommends libc6:armhf libstdc++6:armhf curl ca-certificates locales && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir rcon-cli && \
cd rcon-cli && \
curl -sqL https://github.com/itzg/rcon-cli/releases/download/1.6.4/rcon-cli_1.6.4_linux_arm64.tar.gz | tar zxvf - && \
mv rcon-cli /usr/local/bin/ && \
cd .. && \
rm -rf rcon-cli
RUN sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && \
locale-gen en_US.UTF-8
ENV LANG 'en_US.UTF-8'
ENV LANGUAGE 'en_US:en'
ARG USERNAME=steam
ARG GROUPNAME=steam
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID $GROUPNAME && \
useradd -m -s /bin/bash -u $UID -g $GID $USERNAME
USER $USERNAME
WORKDIR /home/$USERNAME/steam
RUN curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
RUN box86 steamcmd.sh +login anonymous +app_update 1007 +quit || true && \
mkdir -p ~/.steam/sdk64/ && \
cp ~/steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so ~/.steam/sdk64/ && \
ln -s ~/.steam/sdk64/steamclient.so $HOME/.steam/sdk64/steamservice.so
ENTRYPOINT ["bash", "-c"]
CMD ["bash"]
@mikan-megane
Copy link
Author

あとは中でこれを実行。永続化忘れずに。

box86 steamcmd.sh +login anonymous +app_update 2394010 validate +quit
cd ~/steam/steamapps/common/PalServer/
box64 ./PalServer.sh -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment