From 958c3c12e552b81cf4505221d7a03f9d3c9d818e Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Wed, 27 May 2020 12:47:50 -0700 Subject: [PATCH] [docker] remove wpantund from environment image (#5006) --- etc/docker/environment/Dockerfile | 40 +++++++++++--------- etc/docker/environment/docker-entrypoint.sh | 41 --------------------- 2 files changed, 22 insertions(+), 59 deletions(-) delete mode 100755 etc/docker/environment/docker-entrypoint.sh diff --git a/etc/docker/environment/Dockerfile b/etc/docker/environment/Dockerfile index 508c92583..cc6c274c9 100644 --- a/etc/docker/environment/Dockerfile +++ b/etc/docker/environment/Dockerfile @@ -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 diff --git a/etc/docker/environment/docker-entrypoint.sh b/etc/docker/environment/docker-entrypoint.sh deleted file mode 100755 index f8b79e6da..000000000 --- a/etc/docker/environment/docker-entrypoint.sh +++ /dev/null @@ -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 "$@"