43 lines
1.6 KiB
Docker
43 lines
1.6 KiB
Docker
FROM ubuntu:20.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
#Install depends PKGS & Add user AcoSailBuilder for non-root require.
|
|
#Set AcoSailBuilder passwd as "acosail"
|
|
#Sudo is needed for mounting host volume!
|
|
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 \
|
|
python2.7 locales sudo && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
ln -s /usr/bin/python3 /usr/bin/python && \
|
|
useradd -ms /bin/bash AcoSailBuilder && \
|
|
usermod -aG sudo AcoSailBuilder && \
|
|
echo 'AcoSailBuilder:acosail' | chpasswd
|
|
|
|
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}"
|
|
|
|
#Get project
|
|
#add host volume into docker
|
|
#Fix ssh unkonwn error
|
|
RUN mkdir ~/workspace && \
|
|
cd ~/workspace && \
|
|
repo init -u https://gitee.com/phytium_embedded/phytium-linux-yocto.git -m default.xml && \
|
|
repo sync --force-sync && \
|
|
mkdir ~/build_dir && \
|
|
mkdir ~/.ssh && \
|
|
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
|
|
|
|
#Fix yocto fetch kernel error, but may not be the best solution
|
|
COPY linux-phytium.inc ~/workspace/sources/meta-phytium/meta-bsp/recipes-kernel/linux/linux-phytium.inc
|
|
|