ccprojects commited on
Commit
16782be
·
verified ·
1 Parent(s): e4e2cb6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -9
Dockerfile CHANGED
@@ -1,24 +1,31 @@
1
  FROM ubuntu:22.04
2
 
 
 
 
3
  RUN apt-get update && apt-get install -y \
4
- git cmake clang libsodium-dev libboost-all-dev build-essential \
5
  && rm -rf /var/lib/apt/lists/*
6
 
7
- WORKDIR /app
 
 
 
 
8
 
9
  # Clone Globed2 and Geode SDK
10
- RUN git clone https://github.com/GlobedGD/globed2.git
11
- RUN git clone https://github.com/geode-sdk/geode.git
12
 
13
- # Patch unsupported OS in CMakeLists.txt
14
  WORKDIR /app/globed2
15
- RUN sed -i '/Unsupported operating system/d' CMakeLists.txt \
16
- && sed -i '/if (NOT (${CMAKE_SYSTEM_NAME}/,/endif()/d' CMakeLists.txt
17
 
18
- # Set GEODE_SDK path
19
  ENV GEODE_SDK=/app/geode
20
 
21
- # Build globed2
22
  RUN mkdir build
23
  WORKDIR /app/globed2/build
24
  RUN cmake .. && make -j$(nproc)
 
1
  FROM ubuntu:22.04
2
 
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies (except cmake)
6
  RUN apt-get update && apt-get install -y \
7
+ build-essential clang git wget libsodium-dev libboost-all-dev \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Install CMake 3.27.9 manually
11
+ RUN wget https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9-linux-x86_64.sh && \
12
+ chmod +x cmake-3.27.9-linux-x86_64.sh && \
13
+ ./cmake-3.27.9-linux-x86_64.sh --skip-license --prefix=/usr/local && \
14
+ rm cmake-3.27.9-linux-x86_64.sh
15
 
16
  # Clone Globed2 and Geode SDK
17
+ RUN git clone https://github.com/GlobedGD/globed2.git && \
18
+ git clone https://github.com/geode-sdk/geode.git
19
 
20
+ # Patch CMakeLists.txt to allow Linux build
21
  WORKDIR /app/globed2
22
+ RUN sed -i '/Unsupported operating system/d' CMakeLists.txt && \
23
+ sed -i '/if (NOT (${CMAKE_SYSTEM_NAME}/,/endif()/d' CMakeLists.txt
24
 
25
+ # Set Geode SDK path
26
  ENV GEODE_SDK=/app/geode
27
 
28
+ # Build project
29
  RUN mkdir build
30
  WORKDIR /app/globed2/build
31
  RUN cmake .. && make -j$(nproc)