-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (53 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
62 lines (53 loc) · 1.34 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This Dockerfile is only for Linux testing purpose
FROM debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
# ---------------------------------------------
# Dependencies
# ---------------------------------------------
RUN apt update && apt install -y \
build-essential \
cmake \
git \
wget \
tar \
autoconf \
automake \
make \
libtool \
pkg-config \
python3 \
python3-pip \
g++ \
gcc \
ninja-build \
curl \
bash \
zip \
unzip \
libx11-dev \
libxrandr-dev \
libxcursor-dev \
libxi-dev \
libudev-dev \
libgl1-mesa-dev
# ---------------------------------------------
# Install vcpkg
# ---------------------------------------------
WORKDIR /opt
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
RUN git clone https://github.com/microsoft/vcpkg.git && \
./vcpkg/bootstrap-vcpkg.sh
ENV VCPKG_ROOT=/opt/vcpkg
ENV PATH="${VCPKG_ROOT}:${PATH}"
# ---------------------------------------------
# Copy the project
# ---------------------------------------------
WORKDIR /app
COPY . .
# ---------------------------------------------
# Configure + Build
# ---------------------------------------------
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake
RUN cmake --build build -j$(nproc)
CMD ["/bin/bash"]