-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a new base layer without a toolchain
Add a new base layer without toolchains to allow for downstream customization and usage with non zephyr-sdk toolchains. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- Loading branch information
Showing
4 changed files
with
207 additions
and
124 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
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,134 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ARG CMAKE_VERSION=3.20.5 | ||
ARG WGET_ARGS="-q --show-progress --progress=bar:force:noscroll --no-check-certificate" | ||
|
||
ARG UID=1000 | ||
ARG GID=1000 | ||
|
||
# Set default shell during Docker image build to bash | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Set non-interactive frontend for apt-get to skip any user confirmations | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install base packages | ||
RUN apt-get -y update && \ | ||
apt-get -y upgrade && \ | ||
apt-get install --no-install-recommends -y \ | ||
software-properties-common \ | ||
lsb-release \ | ||
autoconf \ | ||
automake \ | ||
bison \ | ||
build-essential \ | ||
ca-certificates \ | ||
ccache \ | ||
chrpath \ | ||
cpio \ | ||
device-tree-compiler \ | ||
dfu-util \ | ||
diffstat \ | ||
dos2unix \ | ||
doxygen \ | ||
file \ | ||
flex \ | ||
g++ \ | ||
gawk \ | ||
gcc \ | ||
gcovr \ | ||
git \ | ||
git-core \ | ||
gnupg \ | ||
gperf \ | ||
gtk-sharp2 \ | ||
help2man \ | ||
iproute2 \ | ||
lcov \ | ||
libglib2.0-dev \ | ||
libgtk2.0-0 \ | ||
liblocale-gettext-perl \ | ||
libncurses5-dev \ | ||
libpcap-dev \ | ||
libpopt0 \ | ||
libsdl1.2-dev \ | ||
libsdl2-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
libtool-bin \ | ||
locales \ | ||
make \ | ||
net-tools \ | ||
ninja-build \ | ||
openssh-client \ | ||
pkg-config \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-ply \ | ||
python3-setuptools \ | ||
python-is-python3 \ | ||
qemu \ | ||
rsync \ | ||
socat \ | ||
srecord \ | ||
sudo \ | ||
texinfo \ | ||
unzip \ | ||
valgrind \ | ||
wget \ | ||
ovmf \ | ||
xz-utils | ||
|
||
# Install multi-lib gcc (x86 only) | ||
RUN if [ "${HOSTTYPE}" = "x86_64" ]; then \ | ||
apt-get install --no-install-recommends -y \ | ||
gcc-multilib \ | ||
g++-multilib \ | ||
; fi | ||
|
||
# Install i386 packages (x86 only) | ||
RUN if [ "${HOSTTYPE}" = "x86_64" ]; then \ | ||
dpkg --add-architecture i386 && \ | ||
apt-get -y update && \ | ||
apt-get -y upgrade && \ | ||
apt-get install --no-install-recommends -y \ | ||
libsdl2-dev:i386 \ | ||
; fi | ||
|
||
# Initialise system locale | ||
RUN locale-gen en_US.UTF-8 | ||
ENV LANG=en_US.UTF-8 | ||
ENV LANGUAGE=en_US:en | ||
ENV LC_ALL=en_US.UTF-8 | ||
|
||
# Install CMake | ||
RUN wget ${WGET_ARGS} https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-${HOSTTYPE}.sh && \ | ||
chmod +x cmake-${CMAKE_VERSION}-Linux-${HOSTTYPE}.sh && \ | ||
./cmake-${CMAKE_VERSION}-Linux-${HOSTTYPE}.sh --skip-license --prefix=/usr/local && \ | ||
rm -f ./cmake-${CMAKE_VERSION}-Linux-${HOSTTYPE}.sh | ||
|
||
# Install Python dependencies | ||
RUN pip3 install wheel pip -U &&\ | ||
pip3 install -r https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/master/scripts/requirements.txt && \ | ||
pip3 install -r https://raw.githubusercontent.com/zephyrproject-rtos/mcuboot/master/scripts/requirements.txt && \ | ||
pip3 install west &&\ | ||
pip3 install sh &&\ | ||
pip3 install awscli PyGithub junitparser pylint \ | ||
statistics numpy \ | ||
imgtool \ | ||
protobuf \ | ||
GitPython | ||
|
||
# Clean up stale packages | ||
RUN apt-get clean -y && \ | ||
apt-get autoremove --purge -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Create 'user' account | ||
RUN groupadd -g $GID -o user | ||
|
||
RUN useradd -u $UID -m -g user -G plugdev user \ | ||
&& echo 'user ALL = NOPASSWD: ALL' > /etc/sudoers.d/user \ | ||
&& chmod 0440 /etc/sudoers.d/user | ||
|
||
USER root |
Oops, something went wrong.