From 93bd2954f4c47b197233eaff9b165dee52622f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 28 Feb 2023 19:06:48 +0000 Subject: tests/docker: add USER stanzas to non-lci images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are flat but not generated by lcitool so we need to manually update them with the `useradd` stanza. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20230228190653.1602033-20-alex.bennee@linaro.org> --- tests/docker/dockerfiles/debian-toolchain.docker | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/docker/dockerfiles/debian-toolchain.docker') diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docker/dockerfiles/debian-toolchain.docker index dc95458..687a97f 100644 --- a/tests/docker/dockerfiles/debian-toolchain.docker +++ b/tests/docker/dockerfiles/debian-toolchain.docker @@ -34,3 +34,8 @@ RUN cd /root && ./build-toolchain.sh # then copying the built toolchain from stage 0. FROM docker.io/library/debian:11-slim COPY --from=0 /usr/local /usr/local +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi -- cgit v1.1