From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann E. MORIN Date: Sat, 3 Feb 2018 16:26:15 +0100 Subject: [Buildroot] [PATCH 13/14] support/dockerfile: allow to install packages In-Reply-To: <1516581882-30582-14-git-send-email-ricardo.martincoski@gmail.com> References: <1516581882-30582-1-git-send-email-ricardo.martincoski@gmail.com> <1516581882-30582-14-git-send-email-ricardo.martincoski@gmail.com> Message-ID: <20180203152615.GL2369@scaer> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Ricardo, All, On 2018-01-21 22:44 -0200, Ricardo Martincoski spake thusly: > Some tools in the Docker image can be useful to a single test only. > Allow tests to install packages on the fly instead of adding everything > to the base Docker image. I think I would prefer that our base image has all the tools we need. Regards, Yann E. MORIN. > Signed-off-by: Ricardo Martincoski > Cc: Arnout Vandecappelle > Cc: Peter Korsgaard > Cc: Thomas Petazzoni > Cc: Yann E. MORIN > --- > For a demo, see the beginning of the log at this job: > https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/48876752 > --- > support/docker/Dockerfile | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile > index ebb471f..9d115d8 100644 > --- a/support/docker/Dockerfile > +++ b/support/docker/Dockerfile > @@ -20,7 +20,8 @@ RUN apt-get install -y -qq --no-install-recommends \ > cvs bzr git mercurial subversion wget \ > cpio unzip \ > libncurses5-dev \ > - python-nose2 python-pexpect qemu-system-arm qemu-system-x86 > + python-nose2 python-pexpect qemu-system-arm qemu-system-x86 \ > + sudo > RUN apt-get -q -y autoremove > RUN apt-get -q -y clean > > @@ -31,6 +32,11 @@ RUN /usr/sbin/locale-gen > RUN useradd -ms /bin/bash br-user > RUN chown -R br-user:br-user /home/br-user > > +# Allow user to install packages > +RUN adduser br-user sudo > +RUN echo "br-user ALL = NOPASSWD : /usr/bin/apt-get" > /etc/sudoers.d/apt-get > +RUN chmod 440 /etc/sudoers.d/apt-get > + > USER br-user > WORKDIR /home/br-user > ENV HOME /home/br-user > -- > 2.7.4 > -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'