File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM debian:12
2+
3+ # Set environment variables to avoid interactive prompts during package installations
4+ ENV DEBIAN_FRONTEND=noninteractive
5+
6+ # Update package list and install necessary packages, including Git
7+ RUN apt-get update && \
8+ apt-get install -y --no-install-recommends \
9+ gcc \
10+ g++ \
11+ cmake \
12+ libdrm-dev \
13+ libsdl2-dev \
14+ libsdl2-image-dev \
15+ wayland-protocols \
16+ build-essential \
17+ ca-certificates \
18+ curl \
19+ git \
20+ && apt-get clean \
21+ && rm -rf /var/lib/apt/lists/*
22+
23+ # Verify that GCC, G++, and CMake are installed
24+ RUN gcc --version && g++ --version && cmake --version
25+
26+ WORKDIR app
27+
28+ CMD ["./scripts/build_app.sh"]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ cmake -B build-arm64 -DCMAKE_BUILD_TYPE=Release
4+ cmake --build build-arm64 -j$( nproc)
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Get the directory of the current script and move to the parent directory
4+ # where Dockerfile is located
5+ SCRIPT_PATH=$( readlink -f $0 )
6+ SCRIPT_DIR=$( dirname $SCRIPT_PATH )
7+ ROOT_DIR=$( dirname $SCRIPT_DIR )
8+ cd " $ROOT_DIR "
9+
10+ echo $( pwd)
11+
12+ # Check if the correct argument is passed
13+ if [[ " $1 " == " --create-image" ]]; then
14+ echo " Building the Docker container..."
15+ docker build --platform linux/arm64/v8 -t lvgl-build-arm64-image -f docker/Dockerfile_cross .
16+
17+ elif [[ " $1 " == " --build-app" ]]; then
18+ echo " Running the Docker container..."
19+ docker run --rm --platform linux/arm64/v8 -v $( pwd) :/app lvgl-build-arm64-image
20+
21+ else
22+ echo " Usage: $0 --create-image or --build-app"
23+ exit 1
24+ fi
You can’t perform that action at this time.
0 commit comments