File size: 1,056 Bytes
81a4101
 
16782be
 
 
81a4101
16782be
81a4101
 
16782be
 
 
 
 
81a4101
e4e2cb6
16782be
 
81a4101
16782be
f80aebe
16782be
 
a9dbd96
16782be
e4e2cb6
 
16782be
faeaaaf
f80aebe
faeaaaf
81a4101
 
 
faeaaaf
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
FROM ubuntu:22.04

WORKDIR /app

# Install system dependencies (except cmake)
RUN apt-get update && apt-get install -y \
    build-essential clang git wget libsodium-dev libboost-all-dev \
    && rm -rf /var/lib/apt/lists/*

# Install CMake 3.27.9 manually
RUN wget https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9-linux-x86_64.sh && \
    chmod +x cmake-3.27.9-linux-x86_64.sh && \
    ./cmake-3.27.9-linux-x86_64.sh --skip-license --prefix=/usr/local && \
    rm cmake-3.27.9-linux-x86_64.sh

# Clone Globed2 and Geode SDK
RUN git clone https://github.com/GlobedGD/globed2.git && \
    git clone https://github.com/geode-sdk/geode.git

# Patch CMakeLists.txt to allow Linux build
WORKDIR /app/globed2
RUN sed -i '/Unsupported operating system/d' CMakeLists.txt && \
    sed -i '/if (NOT (${CMAKE_SYSTEM_NAME}/,/endif()/d' CMakeLists.txt

# Set Geode SDK path
ENV GEODE_SDK=/app/geode

# Build project
RUN mkdir build
WORKDIR /app/globed2/build
RUN cmake .. && make -j$(nproc)

EXPOSE 4000

CMD ["./globed_server", "--port", "4000"]