Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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
|
| 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 |
-
#
|
| 36 |
-
COPY --from=builder --chown=appuser:appuser /app/build/
|
|
|
|
| 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 |
|