establish a properish Docker environment
This commit is contained in:
@@ -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
|
||||
|
6
scripts/build_docker_image.sh
Executable file
6
scripts/build_docker_image.sh
Executable 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
13
scripts/run_docker_image.sh
Executable 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
|
Reference in New Issue
Block a user