crops/poky-container

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

Closed this issue · 2 comments

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

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.

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!