mirror of
https://github.com/espressif/openthread.git
synced 2026-08-06 10:47:46 +00:00
[docker] remove wpantund from environment image (#5006)
This commit is contained in:
@@ -2,26 +2,30 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
RUN apt-get -y update
|
||||
RUN apt-get --no-install-recommends install -y git software-properties-common sudo
|
||||
RUN apt-get --no-install-recommends install -y iproute2 psmisc rsyslog
|
||||
RUN set -x \
|
||||
&& apt-get update -y \
|
||||
&& apt-get install -y locales \
|
||||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
|
||||
&& apt-get --no-install-recommends install -fy \
|
||||
git \
|
||||
ninja-build \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
&& python3 -m pip install -U cmake \
|
||||
&& python3 -m pip install wheel
|
||||
|
||||
# setup openthread
|
||||
WORKDIR /
|
||||
COPY . openthread
|
||||
WORKDIR /openthread
|
||||
RUN git reset --hard && git clean -xfd
|
||||
RUN ./script/bootstrap
|
||||
|
||||
# setup wpantund
|
||||
WORKDIR /
|
||||
RUN git clone https://github.com/openthread/wpantund.git
|
||||
WORKDIR /wpantund
|
||||
RUN ./script/bootstrap && ./bootstrap.sh && ./configure && sudo make -j8 && sudo make install
|
||||
|
||||
# entrypoint
|
||||
WORKDIR /
|
||||
COPY etc/docker/environment/docker-entrypoint.sh /
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["bash"]
|
||||
RUN set -x \
|
||||
&& cd openthread \
|
||||
&& ./script/bootstrap \
|
||||
&& mkdir build \
|
||||
&& cd build \
|
||||
&& cmake -GNinja -DOT_PLATFORM=simulation .. \
|
||||
&& ninja
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#
|
||||
# Description:
|
||||
# This file configures docker environemnt to support wpantund
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p /dev/net && mknod /dev/net/tun c 10 200 && chmod 600 /dev/net/tun
|
||||
service dbus restart
|
||||
service rsyslog start
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user