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

apt-get install #55

Closed peter197321 closed 3 months ago

peter197321 commented 3 years ago

I need to install within the crops/poky container some packages (see in the linked document Chapter 3.1 Host packages) since I have no password - how to do it?

(base) PS C:\> docker run --rm -it -v myvolume:/workdir crops/poky --workdir=/workdir
pokyuser@06932ce45056:/workdir$ apt-get install curl
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
pokyuser@06932ce45056:/workdir$
rewitt1 commented 3 years ago

Hi @peter197321,

I believe #19 answers your question. The summary being either:

  1. Build the image yourself and install the packages. The special bit for doing this would be https://github.com/crops/poky-container/issues/19#issuecomment-343601187.
  2. Use docker exec as mentioned in https://github.com/crops/poky-container/issues/19#issuecomment-343571950. You could also drop to a shell using docker exec by instead doing docker exec -it -u root <image hash> bash
peter197321 commented 3 years ago

Hello,

per @rewitt1 it should be "Build" yourself, it means crops/poky are useless? So the intention is to reuse as much as possible from crops/poky.

Where and which parts should I modify to add my needed packages?

Thanks for your comments.

moto-timo commented 3 months ago

Closing this as we will not fix this. If you need a custom container image, please look into using crops-generator. See the video. Take control of your own Open Source Adventure. Build your own container.