diff --git a/Dockerfile b/Dockerfile index 4607acc..7e4bd31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,14 @@ RUN apt-get update && apt-get install -y \ build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ xz-utils debianutils iputils-ping +RUN apt-get update && apt-get install -y locales \ + && locale-gen en_US.UTF-8 \ + && update-locale LANG=en_US.UTF-8 + +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 + RUN useradd -ms /bin/bash yocto USER yocto WORKDIR /home/yocto diff --git a/scripts/build_docker_image.sh b/scripts/build_docker_image.sh new file mode 100755 index 0000000..aeb94a6 --- /dev/null +++ b/scripts/build_docker_image.sh @@ -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!" diff --git a/scripts/run_docker_image.sh b/scripts/run_docker_image.sh new file mode 100755 index 0000000..c3aa4ee --- /dev/null +++ b/scripts/run_docker_image.sh @@ -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