[Sound-open-firmware] [PATCH V2 2/2] scripts: docker: Simplify docker build
Pan, Xiuli
xiuli.pan at linux.intel.com
Thu Jun 7 14:33:06 CEST 2018
On 6/7/2018 19:26, Liam Girdwood wrote:
> On Wed, 2018-06-06 at 12:06 +0800, Pan, Xiuli wrote:
>>>> -RUN useradd --create-home -d /home/sof -u $UID -G sudo sof
>>>> -RUN echo "sof:test0000" | chpasswd
>>>> -RUN adduser sof sudo
>>>> +# Set up sof user
>>>> +RUN useradd --create-home -d /home/sof -u $UID -G sudo sof && \
>>>> +echo "sof:test0000" | chpasswd && adduser sof sudo && echo '%sudo
>>>> ALL=(ALL)
>>>> NOPASSWD:ALL' >> /etc/sudoers
>>> Does this mean rimage is installed on the Docker FS overlay with no password
>>> now
>>> ?
>> The rimage is installed every time when we run scripts/xtensa-build-all.sh.
>> And the docker-run recommend to use scripts to build the sof. This
>> change just make sudo need no password in docker.
>> The rimage install need sudo with password, either we change the scripts
>> or make sudo need no password.
>> I just choose to use no password to make docker easier to use.
>
> We can't compromise security. Maybe the easiest thing is to make xtensa-build.sh
So even if we are running in a docker we could not make the NOPASSWD to
make life easier. It only influence the docker container.
> take a -l flag to install rimage to ~/bin and use this version.
Or maybe I will add a ENV in docker like export DOCKERRUN=1. The
xtensa-build.sh then check the ENV, if it had the ENV then we install
the rimage into ~/bin, otherwise the scripts goes like the normal way.
Thanks
Xiuli
>
> Liam
More information about the Sound-open-firmware
mailing list