forked from umati/Sample-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (52 loc) · 2.09 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# MIT License
#
# Copyright (c) 2019-2021 Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.)
# Copyright (c) 2021-2023 Götz Görisch, VDW - Verein Deutscher Werkzeugmaschinenfabriken e.V.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
FROM alpine:3.19.1 as build-env
RUN apk --no-cache add \
bash=5.2.21-r0 \
cmake=3.27.8-r0 \
gcc=13.2.1_git20231014-r0 \
g++=13.2.1_git20231014-r0\
git=2.43.0-r0 \
make=4.4.1-r2 \
python3=3.11.6-r1 \
patch=2.7.6-r10 \
linux-headers=6.5-r0 && \
mkdir /install
ARG BUILD_TYPE=Debug
COPY . /src/Sample-Server
WORKDIR /build
RUN cmake /src/Sample-Server/.github/ \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX:PATH=/install /build &&\
cmake --build .
FROM alpine:3.19.1 as runtime
RUN apk --no-cache add \
libstdc++=13.2.1_git20231014-r0
COPY --from=build-env /install/bin /app
COPY ./configuration.docker.json /configuration.json
RUN adduser -DH sampleserver
USER sampleserver
EXPOSE 4840
ENTRYPOINT ["/app/SampleServer"]
HEALTHCHECK CMD netstat -ltn | grep -c 4840