Add docker instructions

This commit is contained in:
Elias Ahokas
2025-09-21 16:46:17 +03:00
parent 3a414ee976
commit cb2a0e91f9
2 changed files with 16 additions and 1 deletions

14
scripts/run_docker_container.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# made partly with chatgpt
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
IMAGE_NAME="yocto-embedded-course"
docker run -it --rm \
-v "$REPO_ROOT:/home/yocto/yocto" \
-v "$REPO_ROOT/cache:/opt" \
$IMAGE_NAME \
bash -c "source /home/yocto/yocto/poky/oe-init-build-env /home/yocto/yocto/build && exec bash"