]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
Dockerfile: set root user and group in constants.py
authorAleš Mrázek <ales.mrazek@nic.cz>
Mon, 4 Nov 2024 10:13:29 +0000 (11:13 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 5 Nov 2024 09:35:31 +0000 (10:35 +0100)
Dockerfile

index be5f5cd90104270092f2da98ccae8a13720f2cc6..82ae8e7c4742e1b10538328120866891a76a1589 100644 (file)
@@ -6,7 +6,6 @@ FROM debian:12 AS build
 ENV OBS_REPO=knot-resolver-latest
 ENV DISTROTEST_REPO=Debian_12
 
-
 RUN apt-get update -qq && \
        apt-get -qqq -y install \
                apt-transport-https ca-certificates wget \
@@ -25,11 +24,19 @@ RUN cd /source && \
        git submodule update --init --recursive && \
        git config --global user.name "Docker Build" && \
        git config --global user.email docker-build@knot-resolver && \
-       sed s/knot-resolver/root/g -i meson_options.txt && git commit -a -m TMP && \
+       \
+       # Replace 'knot-resolver' user and group with 'root'
+       # in meson_options.tx and python/knot_resolver/constants.py.
+       # This is needed for the file/directory permissions validation
+       # and then for the proper functioning of the resolver.
+       sed s/knot-resolver/root/g -i meson_options.txt && \
+       sed 's/USER.*/USER = "root"/g' -i python/knot_resolver/constants.py && \
+       sed 's/GROUP.*/GROUP = "root"/g' -i python/knot_resolver/constants.py && \
+       git commit -a -m TMP && \
+       \
        /root/.local/bin/apkg build-dep -y && \
        /root/.local/bin/apkg build
 
-
 # Real container
 FROM debian:12-slim AS runtime