E2000-yocto-docker/Dockerfile_1.0

48 lines
1.5 KiB
Plaintext

FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y curl git gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
libsdl1.2-dev pylint3 xterm libncursesw5-dev openssl libssl-dev zstd && \
rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN useradd -ms /bin/bash AcoSailBuilder
RUN usermod -aG sudo AcoSailBuilder
USER AcoSailBuilder
RUN mkdir -p /home/AcoSailBuilder/bin && \
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo && \
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo' && \
chmod a+x ~/bin/repo
ENV PATH="/home/AcoSailBuilder/bin:${PATH}"
RUN mkdir ~/workspace && \
cd ~/workspace && \
repo init -u https://gitee.com/phytium_embedded/phytium-linux-yocto.git -m default.xml && \
repo sync --force-sync
#Fix yocto fetch kernel error, but may not be the dest solution
COPY linux-phytium.inc ~/workspace/sources/meta-phytium/meta-bsp/recipes-kernel/linux/linux-phytium.inc
USER root
RUN apt-get update && \
apt-get install -y python2.7 locales sudo && \
locale-gen en_US.UTF-8 && \
rm -rf /var/lib/apt/lists/*
RUN echo 'AcoSailBuilder:acosail' | chpasswd
USER AcoSailBuilder
# For add host volume into docker
RUN mkdir ~/build_dir && \
mkdir ~/.ssh && \
ssh-keyscan gitee.com >> ~/.ssh/known_hosts