Update Dockerfile and build script to include HOST_UID and HOST_GID arguments for improved user permissions

This commit is contained in:
2026-05-27 08:14:20 +02:00
parent 079edee6e6
commit ac6482a4a1
2 changed files with 8 additions and 4 deletions
+6 -3
View File
@@ -1,5 +1,7 @@
ARG UBUNTU_VERSION=24.04
FROM ubuntu:${UBUNTU_VERSION}
ARG HOST_UID
ARG HOST_GID
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
@@ -10,7 +12,8 @@ RUN apt-get update \
WORKDIR /build
COPY . src/
RUN cd src && dpkg-buildpackage -us -uc -b \
&& mkdir /out \
RUN cd src && dpkg-buildpackage -us -uc -b
RUN mkdir /out \
&& find /build -maxdepth 1 \( -name '*.deb' -o -name '*.buildinfo' -o -name '*.changes' \) \
-exec mv {} /out/ \;
-exec install -o "$HOST_UID" -g "$HOST_GID" -m 0644 {} /out/ \;