-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (36 loc) · 1.2 KB
/
Dockerfile
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
ARG APP_VERSION="0.0.0"
FROM debian:bookworm-slim
# NOTE: vcpkg packages expect various build tools to be present.
# The *-dev packages especially pull in many additional
# dependencies.
RUN apt-get update && apt-get -y --no-install-suggests install \
automake \
bison \
ca-certificates \
cmake \
curl \
g++ \
git \
make \
libgtk-3-dev \
libtool \
libwxgtk3.2-dev \
python3 \
python3-jinja2 \
unzip \
zip \
&& apt-get clean \
&& rm -r /var/lib/apt/lists /var/cache/apt
WORKDIR /src
COPY . /src
# not necessary if this has been performed on the host, but just in case
RUN ["git", "submodule", "update", "--init", "--recursive"]
# bootstrap vcpkg (download the vcpkg executable itself)
RUN ["./vendor/microsoft/vcpkg/bootstrap-vcpkg.sh"]
SHELL ["/bin/bash", "-c"]
ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION}
#TODO it's not clear why we need CMAKE_MAKE_PROGRAM; this is supposed to be detected automatically;
# is it because the shell form of RUN doesn't capture environment variables? (a new shell is invoked)
CMD cmake -DCMAKE_MAKE_PROGRAM=make -D APP_VERSION="${APP_VERSION}" --preset release \
&& cmake --build --preset release