#Cpp, docker, cmake, websockets

9 messages · Page 1 of 1 (latest)

stray karma
#

Hey, I'm trying to build a docker with a websocker inside. But I have the same error every time during the buuild of the docker

Here are my docs

#

This is my Dockerfile

Étape 1 : Base image

FROM ubuntu:24.04

Étape 2 : Installer les dépendances système

RUN apt update && apt install -y
build-essential
git
curl
zip
unzip
pkg-config
libssl-dev
libuv1-dev
zlib1g-dev
ca-certificates
cmake
&& rm -rf /var/lib/apt/lists/*

Étape 3 : Cloner et configurer vcpkg

WORKDIR /opt
RUN git clone https://github.com/microsoft/vcpkg.git
WORKDIR /opt/vcpkg
RUN ./bootstrap-vcpkg.sh

ENV VCPKG_ROOT=/opt/vcpkg
ENV PATH="${VCPKG_ROOT}:${PATH}"

Étape 4 : Installer les dépendances avec vcpkg

RUN ./vcpkg install uwebsockets:x64-linux

Étape 5 : Copier et builder ton projet

WORKDIR /app
COPY . .

RUN cmake -B build -S .
-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake
-DCMAKE_BUILD_TYPE=Release

RUN cmake --build build

Étape 6 : Préparer l’exécution

EXPOSE 8080
CMD ["./build/GameServer/GameServer"]

GitHub

C++ Library Manager for Windows, Linux, and MacOS. Contribute to microsoft/vcpkg development by creating an account on GitHub.

#

I'm pretty new to setting up this kind of architecture, so I may have done some really stupid things, but I can't seem to find a solution.

#

I can run my project from visual studio without problem

cursive crestBOT
#

@stray karma has reached level 1. GG!

stray karma
#

Also, here is my CMakeLists.txt

#

Thank you for your help ! If you have any idea, do not hesitate 🙂