[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 02/11] tests/docker: add NOUSER for alpine image
From: |
Alex Bennée |
Subject: |
Re: [PATCH v1 02/11] tests/docker: add NOUSER for alpine image |
Date: |
Fri, 11 Feb 2022 17:51:25 +0000 |
User-agent: |
mu4e 1.7.7; emacs 28.0.91 |
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Fri, Feb 11, 2022 at 04:03:00PM +0000, Alex Bennée wrote:
>> The alpine image doesn't have a standard useradd binary so disable
>> this convenience feature for it.
>
> Hmm, can you elaborate on the problem here ?
>
> IIUC, the NOUSER env was just about controlling what docker
> flags we added. I didn't know it had a dependancy on stuff
> inside the image ?
The docker.py script expands the dockerfiles with a:
"RUN id %s 2>/dev/null || useradd -u %d -U %s"
when they are built so when they are invoked for building TCG tests they
won't mess up permissions of the final files. It is a useful convenience
for the other images as well so you can access compilers and tools with
something like:
docker run --rm -it -u (id -u) -v $HOME:$HOME -w (pwd)
qemu/debian-arm64-cross /bin/bash
however it's not required for the normal cross-compile tests as they are
all done inside the docker image. The alpine image being slim doesn't
have this nicety although there is an adduser binary. However given we
don't use alpine for TCG tests I demurred from adding more complexity to
docker.py to handle it.
>
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> tests/docker/Makefile.include | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>> index 0ec59b2193..286f0ac5b5 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -158,6 +158,9 @@ docker-image-debian-native: DOCKER_REGISTRY=
>> docker-image-debian10: NOUSER=1
>> docker-image-debian11: NOUSER=1
>>
>> +# alpine has no adduser
>> +docker-image-alpine: NOUSER=1
>> +
>> #
>> # The build rule for hexagon-cross is special in so far for most of
>> # the time we don't want to build it. While dockers caching does avoid
>> --
>> 2.30.2
>>
>
> Regards,
> Daniel
--
Alex Bennée
[PATCH v1 04/11] tests/docker: update debian-arm64-cross with lci-tool, Alex Bennée, 2022/02/11
[PATCH v1 01/11] tests/docker: restore TESTS/IMAGES filtering, Alex Bennée, 2022/02/11
[PATCH v1 09/11] tests/tcg: build sha1-vector with O3 and compare, Alex Bennée, 2022/02/11