NOT-OMEGA commited on
Commit
ae687b6
Β·
verified Β·
1 Parent(s): fe232f1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -5
Dockerfile CHANGED
@@ -1,8 +1,7 @@
1
-
2
  # ── Stage 1: Builder ─────────────────────────────────────────
3
  FROM ubuntu:22.04 AS builder
4
 
5
- # Install C++ build tools, CMake, Boost, OpenSSL, and nlohmann_json
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  cmake \
@@ -19,7 +18,6 @@ WORKDIR /app
19
  COPY . .
20
 
21
  # Configure and build the C++ project
22
- # This assumes your CMakeLists.txt is set up correctly in the root
23
  RUN cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
24
  RUN cmake --build build -j$(nproc)
25
 
@@ -32,8 +30,9 @@ RUN useradd -m -u 1000 appuser
32
  WORKDIR /app
33
 
34
  # Copy the compiled binary from the builder stage
35
- # IMPORTANT: Replace "YOUR_EXECUTABLE_NAME" with the actual target name from your CMakeLists.txt
36
- COPY --from=builder --chown=appuser:appuser /app/build/collab_docs ./app_server
 
37
  # Copy your frontend file so the C++ server can serve it
38
  COPY --chown=appuser:appuser index.html .
39
 
 
 
1
  # ── Stage 1: Builder ─────────────────────────────────────────
2
  FROM ubuntu:22.04 AS builder
3
 
4
+ # Install all required C++ build tools and libraries
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  cmake \
 
18
  COPY . .
19
 
20
  # Configure and build the C++ project
 
21
  RUN cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
22
  RUN cmake --build build -j$(nproc)
23
 
 
30
  WORKDIR /app
31
 
32
  # Copy the compiled binary from the builder stage
33
+ # FIXED: The executable is 'collabdocs', not 'collab_docs'
34
+ COPY --from=builder --chown=appuser:appuser /app/build/collabdocs ./app_server
35
+
36
  # Copy your frontend file so the C++ server can serve it
37
  COPY --chown=appuser:appuser index.html .
38