Debian Codegraph @

mkspecs/features/data/testserver/Dockerfile

raw
1 # This Dockerfile is used to provision the shared scripts (e.g. startup.sh) and configurations. It
2 # relies on the arguments passed by docker-compose file to build additional images for each service.
3 # To lean more how it works, please check the topic "Use multi-stage builds".
4 # https://docs.docker.com/develop/develop-images/multistage-build/
5
6 ARG provisioningImage
7 FROM $provisioningImage as testserver_tier2
8
9 # Add and merge the testdata into service folder
10 ARG serviceDir
11 ARG shareDir=$serviceDir
12 COPY $serviceDir $shareDir service/
13
14 # create the shared script of testserver
15 RUN echo "#!/usr/bin/env bash\n" \
16 "set -ex\n" \
17 "for RUN_CMD; do \$RUN_CMD; done\n" \
18 "service dbus restart\n" \
19 "service avahi-daemon restart\n" \
20 "sleep infinity\n" > startup.sh
21 RUN chmod +x startup.sh
22
23 # rewrite the default configurations of avahi-daemon
24 # Disable IPv6 of avahi-daemon to resolve the unstable connections on Windows
25 ARG test_domain
26 RUN sed -i -e "s,#domain-name=local,domain-name=${test_domain:-test-net.qt.local}," \
27 -e "s,#publish-aaaa-on-ipv4=yes,publish-aaaa-on-ipv4=no," \
28 -e "s,use-ipv6=yes,use-ipv6=no," \
29 /etc/avahi/avahi-daemon.conf