Giter VIP home page Giter VIP logo

poky-container's Introduction

Poky Container

This repo is to create an image that is able to run bitbake/poky. The main difference between it and https://github.com/crops/yocto-dockerfiles is that 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.

The instructions will be slightly different depending on whether Linux, Windows or Mac is used. There are setup instructions for using Windows/Mac at https://github.com/crops/docker-win-mac-docs/wiki. When referring to Windows/Mac in the rest of the document, it is assumed the instructions at https://github.com/crops/docker-win-mac-docs/wiki were followed.

Running the container

Here a very simple but usable scenario for using the container is described. It is by no means the only way to run the container, but is a great starting point.

  • Create a workdir or volume

    • Linux

      The workdir you create will be used for the output created while using the container. For example a user could create a directory using the command

      mkdir -p /home/myuser/mystuff
      

      It is important that you are the owner of the directory. The owner of the directory is what determines the user id used inside the container. If you are not the owner of the directory, you may not have access to the files the container creates.

      For the rest of the Linux instructions we'll assume the workdir chosen was /home/myuser/mystuff.

    • Windows/Mac

      On Windows or Mac a workdir isn't needed. Instead the volume called myvolume will be used. This volume should have been created when following the instructions at https://github.com/crops/docker-win-mac-docs/wiki.

  • The docker command

    • Linux

      Assuming you used the workdir from above, the command to run a container for the first time would be:

      docker run --rm -it -v /home/myuser/mystuff:/workdir crops/poky --workdir=/workdir
      

      or, if you have SELinux in enforcing mode:

      docker run --rm -it -v /home/myuser/mystuff:/workdir:Z crops/poky --workdir=/workdir
      
    • Windows/Mac

      docker run --rm -it -v myvolume:/workdir crops/poky --workdir=/workdir
      

    Let's discuss the options:

    • --workdir=/workdir: This causes the container to start in the directory specified. This can be any directory in the container. The container will also use the uid and gid of the workdir as the uid and gid of the user in the container.

    This should put you at a prompt similar to:

    pokyuser@3bbac563cacd:/workdir$
    

    At this point you should be able to follow the same instructions as described in https://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#releases.

poky-container's People

Contributors

bavery22 avatar rewitt1 avatar gizero avatar diegorondini avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.