-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
31 lines (24 loc) · 915 Bytes
/
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
FROM ubuntu:22.04
WORKDIR /app
# tells apt not to prompt for user input, debconf for package configuration, and setting it to noninteractive ensures that any configuration questions are skipped or assigned default values.
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y build-essential
RUN apt install -y qtbase5-dev qttools5-dev
RUN apt install -y git
RUN apt install -y cmake
RUN git clone --recursive https://github.com/serhmarch/ModbusTools.git
WORKDIR /app/bin
# build
RUN cmake -S /app/ModbusTools -B .
RUN cmake --build .
RUN cmake --build . --config Debug
RUN cmake --build . --config Release
COPY <<'EOF' ./entrypoint.sh
#!/bin/bash
./server &
./client
EOF
RUN chmod +x ./entrypoint.sh
# we need the display env var to be set to the proper host's Xserver in order to be able to run a GUI app in the docker container
ENV DISPLAY=
ENTRYPOINT ["/bin/bash", "-c", "./entrypoint.sh"]