establish a properish Docker environment

This commit is contained in:
Elias Ahokas
2025-09-20 21:58:08 +03:00
parent dacbba592b
commit dd19f62e32
3 changed files with 27 additions and 0 deletions

6
scripts/build_docker_image.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Build a docker image for yocto
# Made partly with chatgpt & claude
docker build -t "yocto-embedded-course" ..
echo "Docker image built!"

13
scripts/run_docker_image.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/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