This project sets up a Docker environment for building Yocto projects, ensuring a consistent and isolated build setup.
- Docker: Ensure Docker is installed on your system. Follow the Docker installation guide for instructions.
- Yocto Project Directory: Have a local directory with your Yocto project ready. Use absolute paths, as Docker only supports them for mounting volumes.
-
Clone the Repository:
Clone the repository to your local machine:
git clone https://github.com/keyfour/yocto-builder.git cd yocto-builder
-
Prepare Your Local Directory:
Ensure your Yocto project directory is available. This directory will be mounted into the Docker container.
-
Run the Script:
Use the
run_yocto_container.sh
script to build the Docker image and start the container. Replace<absolute-path-to-your-directory>
with the absolute path to your Yocto project directory../run_yocto_container.sh <absolute-path-to-your-directory>
- The script checks if the provided directory exists.
- If valid, it builds the Docker image and starts the container with the directory mounted.
-
Access the Docker Container:
Once the container starts, you’ll be in its interactive terminal. Your Yocto project directory is mounted at
/home/yoctobuilder/yocto-project
. -
Build Your Yocto Project:
Inside the container, navigate to the mounted directory and execute your Yocto build commands.
cd /home/yoctobuilder/yocto-project # Run your Yocto build commands here
-
Docker Permissions: Depending on your setup, you might need to use
sudo
for Docker commands. -
Directory Path: Ensure the path provided to the script is an absolute path and the directory exists.
-
Script Permissions: Ensure the
run_yocto_container.sh
script has execute permissions:chmod +x run_yocto_container.sh
Contributions are welcome! Please submit a pull request or open an issue for any improvements or discussions.
This project is licensed under the MIT License. See the LICENSE file for details.