crops / poky-container

A container image that is able to run bitbake/poky. It has helpers to create users and groups within the container. This is so that the output generated in the container will be readable by the user on the host.
GNU General Public License v2.0
206 stars 94 forks source link

Can't extend crops/poky image with new dockerfile commands #43

Closed bbergquist0930 closed 4 years ago

bbergquist0930 commented 4 years ago

Dockerfile looks like

` FROM crops/poky USER root

RUN apt-get install npm -y

USER usersetup I build the docker image with docker build -t crops/poky-canoga . `

and then try to run the image with

brett@cp-ubuntu2:~/yocto/crops-canoga$ docker run --rm -it -vpwd/work:/workdir crops/poky-canoga --workdir=/workdir sudo: unknown user: pokyuser sudo: unable to initialize policy plugin

This dockerfile is right out of issue#19

rewitt1 commented 4 years ago

Hi @bbergquist0930,

Does #20, describe what you are seeing? If you create the pwd/work directory before starting the container it should work fine. i.e.

mkdir `pwd`/work
docker run --rm -it -v `pwd`/work:/workdir crops/poky-canoga --workdir=/workdir

should work in your scenario.

bbergquist0930 commented 4 years ago

Yes it works correctly. The issue was running the run command wrong first and it created the "workdir" but owned by root/root.

Once I deleted the "workdir" and created it manually first, then it works correctly.

Thank you for taking the time to respond!