-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Build Environment for Yocto Build in Docker container
For GitHub self-hosted CI actions Signed-off-by: Alex J Lennon <[email protected]>
- Loading branch information
0 parents
commit 7437ce9
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#docker build . -t yocto-ci-build | ||
#docker run -it --rm -v${PWD}:/home/build/yocto yocto-ci-build | ||
FROM ubuntu:16.04 | ||
|
||
ENV DEBIAN_FRONTENV noninteractive | ||
ENV TERM=linux | ||
|
||
RUN apt-get update --fix-missing && apt-get -y upgrade | ||
|
||
# Required Packages for the Host Development System | ||
# http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#required-packages-for-the-host-development-system | ||
RUN apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib g++-multilib \ | ||
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ | ||
apt-utils tmux xz-utils debianutils iputils-ping libncurses5-dev vim | ||
|
||
# Additional recommended packages | ||
RUN apt-get install -y coreutils python2.7 libsdl1.2-dev xterm libssl-dev libelf-dev \ | ||
android-tools-fsutils ca-certificates repo whiptail # openjdk-11-jre | ||
|
||
# Additional host packages required by poky/scripts/wic | ||
RUN apt-get install -y curl dosfstools mtools parted syslinux tree zip | ||
|
||
RUN apt-get install -y nano | ||
|
||
# Create a non-root user that will perform the actual build | ||
RUN id github 2>/dev/null || useradd --uid 1000 --create-home github | ||
RUN apt-get install -y sudo | ||
RUN echo "github ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers | ||
|
||
# Fix error "Please use a locale setting which supports utf-8." | ||
# See https://wiki.yoctoproject.org/wiki/TipsAndTricks/ResolvingLocaleIssues | ||
RUN apt-get install -y locales | ||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
echo 'LANG="en_US.UTF-8"'>/etc/default/locale && \ | ||
dpkg-reconfigure --frontend=noninteractive locales && \ | ||
update-locale LANG=en_US.UTF-8 | ||
|
||
RUN update-alternatives --install /bin/sh sh /bin/bash 100 | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
||
USER github | ||
WORKDIR /home/github | ||
|
||
# Setup a default git user for clone/checkout | ||
RUN git config --global user.email "[email protected]" | ||
RUN git config --global user.name "yocto" | ||
RUN git config --global http.postBuffer 20k | ||
RUN git config --global url."https://github.com/".insteadOf git://github.com/ | ||
|
||
CMD "/bin/bash" | ||
|
||
#EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
docker build . --tag dynamicdevices/yocto-ci-build |