forked from TeamHypersomnia/Hypersomnia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile TeamHypersomnia#286 [ci skip]
- Loading branch information
1 parent
a8abfb8
commit 68c095b
Showing
2 changed files
with
36 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,24 @@ | ||
FROM ubuntu:jammy AS builder | ||
# run with flags --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined | ||
|
||
RUN apt-get update -qy && \ | ||
apt-get install -y software-properties-common wget && \ | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ | ||
add-apt-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" && \ | ||
apt-get update -qy && \ | ||
apt-get upgrade -qy && \ | ||
apt-get install -qy \ | ||
clang-16 \ | ||
cmake \ | ||
git \ | ||
libc++-16-dev \ | ||
libc++abi-16-dev \ | ||
libmbedtls-dev \ | ||
libsodium-dev \ | ||
libssl-dev \ | ||
lld-16 \ | ||
llvm \ | ||
ninja-build \ | ||
openssl | ||
FROM ubuntu:latest | ||
|
||
ENV CXX=clang++-16 | ||
ENV CC=clang-16 | ||
ENV BUILD_FOLDER_SUFFIX=headless | ||
WORKDIR /app | ||
|
||
COPY . /hypersomnia | ||
WORKDIR /hypersomnia | ||
RUN apt update | ||
RUN apt install -y fuse | ||
RUN apt install -y wget | ||
RUN wget https://hypersomnia.xyz/builds/latest/Hypersomnia-Headless.AppImage | ||
RUN chmod +x Hypersomnia-Headless.AppImage | ||
|
||
RUN cmake/build.sh Release x64 "-DHEADLESS=1" && \ | ||
ninja all -C build/current | ||
RUN mkdir /root/.config | ||
RUN mkdir /root/.config/Hypersomnia | ||
RUN mkdir /root/.config/Hypersomnia/user | ||
COPY server_config.lua /root/.config/Hypersomnia/user/config.lua | ||
|
||
FROM ubuntu:jammy | ||
CMD ["./Hypersomnia-Headless.AppImage"] | ||
|
||
RUN apt-get update -qy && \ | ||
apt-get install -y software-properties-common wget && \ | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ | ||
add-apt-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" && \ | ||
apt-get update -qy && \ | ||
apt-get upgrade -qy && \ | ||
apt-get install -qy \ | ||
libc++abi1-16 \ | ||
libc++1-16 \ | ||
libsodium23 \ | ||
libmbedcrypto7 \ | ||
libmbedtls14 \ | ||
libmbedx509-1 \ | ||
openssl | ||
|
||
RUN useradd -m hypersomnia | ||
COPY --from=builder /hypersomnia/hypersomnia /home/hypersomnia/hypersomnia | ||
COPY --from=builder /hypersomnia/build/current/Hypersomnia /home/hypersomnia/hypersomnia/Hypersomnia | ||
#COPY --from=builder /hypersomnia/hypersomnia/user/config.lua.example /hypersomnia/user/config.lua | ||
RUN chown -R hypersomnia /home/hypersomnia/hypersomnia | ||
RUN chgrp -R hypersomnia /home/hypersomnia/hypersomnia | ||
USER hypersomnia | ||
|
||
WORKDIR /home/hypersomnia/hypersomnia | ||
EXPOSE 8412/tcp | ||
EXPOSE 8412/udp | ||
CMD ["./Hypersomnia", "--dedicated-server"] | ||
EXPOSE 9000-9100/tcp | ||
EXPOSE 9000-9100/udp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
return { | ||
client = { | ||
record_demo = false | ||
}, | ||
last_activity = "MAIN_MENU", | ||
server = { | ||
server_name = "Server" | ||
}, | ||
server_private = { | ||
master_rcon_password = "1234", | ||
rcon_password = "1234" | ||
}, | ||
server_start = { | ||
port = 8412, | ||
slots = 20 | ||
}, | ||
skip_tutorial = true | ||
} | ||
|