diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2023-02-28 19:06:47 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2023-03-01 12:45:11 +0000 |
commit | 5b8bcf6b6cf7a254854e75def40883e2a8fea5dc (patch) | |
tree | 27762903713ba5ab30a085b9ad7f1636c85eba76 /tests/docker/dockerfiles/debian-s390x-cross.docker | |
parent | 60f999b7f2890c9e8ddcd404ce8c4b89b5dee0a2 (diff) | |
download | qemu-5b8bcf6b6cf7a254854e75def40883e2a8fea5dc.zip qemu-5b8bcf6b6cf7a254854e75def40883e2a8fea5dc.tar.gz qemu-5b8bcf6b6cf7a254854e75def40883e2a8fea5dc.tar.bz2 |
tests/lcitool: append user setting stanza to dockerfiles
For the cross-compilation use-case it is important to add the host
user to the dockerfile so we can map them to the docker environment
when cross-building files.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230228190653.1602033-19-alex.bennee@linaro.org>
Diffstat (limited to 'tests/docker/dockerfiles/debian-s390x-cross.docker')
-rw-r--r-- | tests/docker/dockerfiles/debian-s390x-cross.docker | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index d06ea36..6c216dd 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -166,3 +166,8 @@ ENV ABI "s390x-linux-gnu" ENV MESON_OPTS "--cross-file=s390x-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu- ENV DEF_TARGET_LIST s390x-softmmu,s390x-linux-user +# 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 |