交叉编译工具链配套dockerfile
【代码】交叉编译工具链配套dockerfile。
·
# Dockerfile.crossbuild
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
gcc-arm-linux-gnueabihf \
gcc-aarch64-linux-gnu \
device-tree-compiler \
u-boot-tools \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# 安装Python依赖
RUN pip3 install pyelftools cryptography
# 设置多架构支持
RUN dpkg --add-architecture armhf && \
dpkg --add-architecture arm64
# 创建非root用户
RUN useradd -m builder && \
mkdir -p /project && \
chown builder:builder /project
USER builder
WORKDIR /project
更多推荐
所有评论(0)