2021-06-19 15:39:08 +02:00
|
|
|
FROM ubuntu:focal-20210609 AS common
|
2020-12-03 11:34:06 +01:00
|
|
|
|
|
|
|
CMD ["/bin/bash"]
|
|
|
|
|
2020-12-03 05:57:49 +01:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2020-12-03 11:34:06 +01:00
|
|
|
ARG ZEPHYR_VERSION
|
|
|
|
ENV ZEPHYR_VERSION=${ZEPHYR_VERSION}
|
|
|
|
RUN \
|
|
|
|
apt-get -y update \
|
|
|
|
&& apt-get -y install --no-install-recommends \
|
|
|
|
ccache \
|
|
|
|
file \
|
|
|
|
gcc \
|
|
|
|
gcc-multilib \
|
|
|
|
git \
|
|
|
|
gperf \
|
|
|
|
make \
|
|
|
|
ninja-build \
|
|
|
|
python3 \
|
2021-06-14 13:03:46 +02:00
|
|
|
python3-dev \
|
2020-12-03 11:34:06 +01:00
|
|
|
python3-pip \
|
|
|
|
python3-setuptools \
|
|
|
|
python3-wheel \
|
|
|
|
&& pip3 install \
|
|
|
|
-r https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/v${ZEPHYR_VERSION}/scripts/requirements-base.txt \
|
2021-10-26 06:31:16 +02:00
|
|
|
&& pip3 install cmake \
|
2020-12-03 11:34:06 +01:00
|
|
|
&& apt-get remove -y --purge \
|
2021-06-14 13:03:46 +02:00
|
|
|
python3-dev \
|
2020-12-03 11:34:06 +01:00
|
|
|
python3-pip \
|
|
|
|
python3-setuptools \
|
|
|
|
python3-wheel \
|
|
|
|
&& apt-get clean \
|
2021-06-10 21:23:56 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2020-12-03 11:34:06 +01:00
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
FROM common AS dev-generic
|
|
|
|
|
2020-12-02 22:32:59 +01:00
|
|
|
ENV LC_ALL=C
|
2021-05-19 19:59:18 +02:00
|
|
|
ENV PAGER=less
|
2020-12-02 22:32:59 +01:00
|
|
|
|
2020-12-03 11:34:06 +01:00
|
|
|
RUN \
|
|
|
|
apt-get -y update \
|
2021-06-15 20:27:48 +02:00
|
|
|
&& apt-get -y install --no-install-recommends \
|
2020-12-02 14:04:53 +01:00
|
|
|
curl \
|
|
|
|
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
|
|
|
&& apt-get -y update \
|
|
|
|
&& apt-get -y install --no-install-recommends \
|
2020-12-07 16:03:31 +01:00
|
|
|
clang-format \
|
2020-12-03 11:34:06 +01:00
|
|
|
g++-multilib \
|
2021-05-18 12:28:16 +02:00
|
|
|
gdb \
|
2020-11-26 15:21:58 +01:00
|
|
|
gpg \
|
2020-12-02 14:04:53 +01:00
|
|
|
gpg-agent \
|
2021-05-18 12:28:07 +02:00
|
|
|
less \
|
2021-10-26 06:31:16 +02:00
|
|
|
libpython3.8-dev \
|
2020-12-03 11:34:06 +01:00
|
|
|
libsdl2-dev \
|
2020-12-02 22:32:59 +01:00
|
|
|
locales \
|
2020-11-26 21:07:02 +01:00
|
|
|
nano \
|
2020-12-02 14:04:53 +01:00
|
|
|
nodejs \
|
2020-12-03 11:34:06 +01:00
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
python3-setuptools \
|
|
|
|
python3-tk \
|
|
|
|
python3-wheel \
|
2021-05-20 23:05:24 +02:00
|
|
|
socat \
|
2020-11-26 15:21:58 +01:00
|
|
|
ssh \
|
2021-06-15 18:27:14 +02:00
|
|
|
tio \
|
2020-12-03 11:34:06 +01:00
|
|
|
wget \
|
|
|
|
xz-utils \
|
|
|
|
&& pip3 install \
|
|
|
|
-r https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/v${ZEPHYR_VERSION}/scripts/requirements-build-test.txt \
|
|
|
|
-r https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/v${ZEPHYR_VERSION}/scripts/requirements-run-test.txt \
|
|
|
|
&& apt-get clean \
|
2021-06-10 21:22:53 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2020-12-03 11:34:06 +01:00
|
|
|
|
2021-06-15 16:40:24 +02:00
|
|
|
ARG ZEPHYR_SDK_VERSION
|
|
|
|
ENV ZEPHYR_SDK_VERSION=${ZEPHYR_SDK_VERSION}
|
|
|
|
|
2020-12-03 05:57:49 +01:00
|
|
|
ENV DEBIAN_FRONTEND=
|
|
|
|
|
2020-12-03 11:34:06 +01:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
FROM common AS build
|
|
|
|
|
|
|
|
ARG ARCHITECTURE
|
|
|
|
ARG ZEPHYR_SDK_VERSION
|
2021-10-26 06:28:57 +02:00
|
|
|
ARG ZEPHYR_SDK_SETUP_FILENAME=zephyr-toolchain-${ARCHITECTURE}-${ZEPHYR_SDK_VERSION}-linux-x86_64-setup.run
|
2020-12-03 11:34:06 +01:00
|
|
|
ARG ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}
|
|
|
|
RUN \
|
|
|
|
apt-get -y update \
|
|
|
|
&& apt-get -y install --no-install-recommends \
|
|
|
|
wget \
|
|
|
|
xz-utils \
|
|
|
|
&& wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/${ZEPHYR_SDK_SETUP_FILENAME}" \
|
|
|
|
&& sh ${ZEPHYR_SDK_SETUP_FILENAME} --quiet -- -d ${ZEPHYR_SDK_INSTALL_DIR} \
|
|
|
|
&& rm ${ZEPHYR_SDK_SETUP_FILENAME} \
|
|
|
|
&& apt-get remove -y --purge \
|
|
|
|
wget \
|
|
|
|
xz-utils \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
FROM dev-generic AS dev
|
|
|
|
|
|
|
|
COPY --from=build ${ZEPHYR_SDK_INSTALL_DIR} ${ZEPHYR_SDK_INSTALL_DIR}
|