ot-br-posix: Docker build fails

Describe the bug A clear and concise description of what the bug is.

To Reproduce Information to reproduce the behavior, including:

  1. current master as of 14.03.2023
  2. proxmox VM Ubuntu 20.04
  3. clone git and executed docker build --no-cache -t openthread/otbr -f etc/docker/Dockerfile .
  4. Network topology

Expected behavior Docker image should build

Console/log output

[+] Building 218.1s (12/13)                                                                                                                 
 => [internal] load build definition from Dockerfile                                                                                   0.3s
 => => transferring dockerfile: 4.33kB                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                      0.2s
 => => transferring context: 2B                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/ubuntu:bionic                                                                       2.1s
 => [internal] load build context                                                                                                      7.1s
 => => transferring context: 240.58MB                                                                                                  2.0s
 => [1/9] FROM docker.io/library/ubuntu:bionic@sha256:1e32b9c52e8f22769df41e8f61066c77b2b35b0a423c4161c0e48eca2fd24f75                 0.4s
 => => resolve docker.io/library/ubuntu:bionic@sha256:1e32b9c52e8f22769df41e8f61066c77b2b35b0a423c4161c0e48eca2fd24f75                 0.2s
 => => sha256:1e32b9c52e8f22769df41e8f61066c77b2b35b0a423c4161c0e48eca2fd24f75 1.33kB / 1.33kB                                         0.0s
 => => sha256:3420178c357dc693532d8c2e592784d0c7f27ce2412cfb029bbbd618fe6ab39d 424B / 424B                                             0.0s
 => => sha256:b89fba62bc15f5e402dfc9e1cb0056e72d392301c324359e486d0a043286f642 2.30kB / 2.30kB                                         0.0s
 => [2/9] RUN env                                                                                                                      6.7s
 => [3/9] RUN apt-get update   && apt-get install --no-install-recommends -y sudo python3 git ca-certificates   && ([ "0" != "1" ] |  40.8s
 => [4/9] COPY ./script /app/script                                                                                                    0.3s 
 => [5/9] WORKDIR /app                                                                                                                 0.5s 
 => [6/9] RUN ./script/bootstrap                                                                                                     157.2s 
 => [7/9] COPY . .                                                                                                                     7.6s 
 => ERROR [8/9] RUN ./script/setup                                                                                                     2.0s 
------                                                                                                                                      
 > [8/9] RUN ./script/setup:                                                                                                                
#0 0.530 +++ dirname ./script/setup                                                                                                         
#0 0.531 ++ cd ./script/..                                                                                                                  
#0 0.532 ++ [[ ! -n x ]]                                                                                                                    
#0 0.532 ++ echo 'Current platform is ubuntu'                                                                                               
#0 0.532 Current platform is ubuntu
#0 0.532 ++ with BORDER_ROUTING
#0 0.532 ++ local value
#0 0.532 +++ printenv BORDER_ROUTING
#0 0.534 ++ value=1
#0 0.534 ++ [[ -z 1 ]]
#0 0.534 ++ [[ 1 == 1 ]]
#0 0.534 ++ with DHCPV6_PD
#0 0.534 ++ local value
#0 0.534 +++ printenv DHCPV6_PD
#0 0.535 ++ value=
#0 0.535 ++ [[ -z '' ]]
#0 0.535 ++ [[ -f examples/platforms/ubuntu/default ]]
#0 0.535 +++ . examples/platforms/ubuntu/default
#0 0.535 ++++ NAT64=1
#0 0.535 ++++ DNS64=0
#0 0.535 ++++ DHCPV6_PD=0
#0 0.535 ++++ NETWORK_MANAGER=0
#0 0.535 ++++ BACKBONE_ROUTER=1
#0 0.535 ++++ BORDER_ROUTING=1
#0 0.535 ++++ WEB_GUI=1
#0 0.535 ++++ REST_API=1
#0 0.535 +++ eval echo '${DHCPV6_PD-}'
#0 0.535 ++++ echo 0
#0 0.535 ++ value=0
#0 0.536 ++ [[ 0 == 1 ]]
#0 0.536 ++ with BORDER_ROUTING
#0 0.536 ++ local value
#0 0.536 +++ printenv BORDER_ROUTING
#0 0.537 ++ value=1
#0 0.537 ++ [[ -z 1 ]]
#0 0.537 ++ [[ 1 == 1 ]]
#0 0.537 ++ with NETWORK_MANAGER
#0 0.537 ++ local value
#0 0.537 +++ printenv NETWORK_MANAGER
#0 0.538 ++ value=
#0 0.538 ++ [[ -z '' ]]
#0 0.538 ++ [[ -f examples/platforms/ubuntu/default ]]
#0 0.539 +++ . examples/platforms/ubuntu/default
#0 0.539 ++++ NAT64=1
#0 0.539 ++++ DNS64=0
#0 0.539 ++++ DHCPV6_PD=0
#0 0.539 ++++ NETWORK_MANAGER=0
#0 0.539 ++++ BACKBONE_ROUTER=1
#0 0.539 ++++ BORDER_ROUTING=1
#0 0.539 ++++ WEB_GUI=1
#0 0.539 ++++ REST_API=1
#0 0.539 +++ eval echo '${NETWORK_MANAGER-}'
#0 0.539 ++++ echo 0
#0 0.539 ++ value=0
#0 0.539 ++ [[ 0 == 1 ]]
#0 0.539 ++ STAGE_DIR=/app/stage
#0 0.539 ++ BUILD_DIR=/app/build
#0 0.539 ++ [[ -d /app/stage ]]
#0 0.539 ++ [[ -d /app/build ]]
#0 0.539 ++ export PATH=/app/stage/usr/bin:/app/stage/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#0 0.539 ++ PATH=/app/stage/usr/bin:/app/stage/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#0 0.540 +++ basename ./script/setup
#0 0.542 ++ TASKNAME=setup
#0 0.542 ++ BEFORE_HOOK=examples/platforms/ubuntu/before_setup
#0 0.542 ++ AFTER_HOOK=examples/platforms/ubuntu/after_setup
#0 0.542 ++ [[ ! -f examples/platforms/ubuntu/before_setup ]]
#0 0.542 ++ BEFORE_HOOK=/dev/null
#0 0.542 ++ [[ ! -f examples/platforms/ubuntu/after_setup ]]
#0 0.542 ++ AFTER_HOOK=/dev/null
#0 0.542 + . script/_border_routing
#0 0.542 ++ INFRA_IF_NAME=eth0
#0 0.542 ++ readonly INFRA_IF_NAME
#0 0.542 ++ SYSCTL_ACCEPT_RA_FILE=/etc/sysctl.d/60-otbr-accept-ra.conf
#0 0.542 ++ readonly SYSCTL_ACCEPT_RA_FILE
#0 0.542 ++ DHCPCD_CONF_FILE=/etc/dhcpcd.conf
#0 0.543 ++ readonly DHCPCD_CONF_FILE
#0 0.543 ++ DHCPCD_CONF_BACKUP_FILE=/etc/dhcpcd.conf.orig
#0 0.543 ++ readonly DHCPCD_CONF_BACKUP_FILE
#0 0.543 + . script/_otbr
#0 0.543 ++ OTBR_TOP_BUILDDIR=/app/build/otbr
#0 0.544 ++ readonly OTBR_TOP_BUILDDIR
#0 0.544 ++ OTBR_OPTIONS=
#0 0.544 ++ readonly OTBR_OPTIONS
#0 0.544 ++ REFERENCE_DEVICE=0
#0 0.544 ++ readonly REFERENCE_DEVICE
#0 0.544 + . script/_ipforward
#0 0.544 ++ SYSCTL_IP_FORWARD=/etc/sysctl.d/60-otbr-ip-forward.conf
#0 0.544 + . script/_nat64
#0 0.545 ++ NAT64_SERVICE=openthread
#0 0.545 ++ TAYGA_DEFAULT=/etc/default/tayga
#0 0.545 ++ TAYGA_CONF=/etc/tayga.conf
#0 0.545 ++ TAYGA_IPV4_ADDR=192.168.255.1
#0 0.545 ++ TAYGA_IPV6_ADDR=fdaa:bb:1::1
#0 0.545 ++ TAYGA_TUN_V6_ADDR=fdaa:bb:1::2
#0 0.545 ++ NAT64_PREFIX=64:ff9b::/96
#0 0.545 ++ DYNAMIC_POOL=192.168.255.0/24
#0 0.545 ++ NAT44_SERVICE=/etc/init.d/otbr-nat44
#0 0.545 ++ WLAN_IFNAMES=eth0
#0 0.545 + . script/_dns64
#0 0.546 ++ BIND_CONF_OPTIONS=/etc/bind/named.conf.options
#0 0.546 ++ NAT64_PREFIX=64:ff9b::/96
#0 0.546 ++ DNS64_NAMESERVER_ADDR=127.0.0.1
#0 0.547 +++ echo 64:ff9b::/96
#0 0.547 +++ tr '"/"' '"/"'
#0 0.548 ++ DNS64_CONF='dns64 64:ff9b::/96 { clients { thread; }; recursive-only yes; };'
#0 0.548 ++ without NAT64
#0 0.548 ++ with NAT64
#0 0.548 ++ local value
#0 0.549 +++ printenv NAT64
#0 0.549 ++ value=1
#0 0.550 ++ [[ -z 1 ]]
#0 0.550 ++ [[ 1 == 1 ]]
#0 0.550 ++ without DNS64
#0 0.550 ++ with DNS64
#0 0.550 ++ local value
#0 0.550 +++ printenv DNS64
#0 0.551 ++ value=0
#0 0.551 ++ [[ -z 0 ]]
#0 0.551 ++ [[ 0 == 1 ]]
#0 0.551 ++ '[' ubuntu = raspbian ']'
#0 0.551 ++ '[' ubuntu = beagleboneblack ']'
#0 0.551 ++ '[' ubuntu = ubuntu ']'
#0 0.551 ++ RESOLV_CONF_HEAD=/etc/resolvconf/resolv.conf.d/head
#0 0.552 + . script/_dhcpv6_pd
#0 0.552 ++ '[' ubuntu = ubuntu ']'
#0 0.552 ++ WAN_INTERFACE=enp0s3
#0 0.552 ++ WLAN_INTERFACE=wlan0
#0 0.552 ++ WPAN_INTERFACE=wpan0
#0 0.552 ++ DHCPCD_CONF=/etc/dhcpcd.conf
#0 0.552 ++ DHCPCD_CONF_BACKUP=/etc/dhcpcd.conf.orig
#0 0.552 ++ NCP_STATE_NOTIFIER=/usr/sbin/ncp_state_notifier
#0 0.552 ++ NCP_STATE_DISPATCHER=/etc/ncp_state_notifier/dispatcher.d
#0 0.552 ++ NCP_STATE_NOTIFIER_SERVICE_NAME=ncp_state_notifier.service
#0 0.552 ++ NCP_STATE_NOTIFIER_SERVICE=/etc/systemd/system/ncp_state_notifier.service
#0 0.552 ++ DHCPCD_RELOADER=/etc/ncp_state_notifier/dispatcher.d/dhcpcd_reloader
#0 0.552 ++ without DHCPV6_PD
#0 0.552 ++ with DHCPV6_PD
#0 0.552 ++ local value
#0 0.553 +++ printenv DHCPV6_PD
#0 0.554 ++ value=
#0 0.554 ++ [[ -z '' ]]
#0 0.554 ++ [[ -f examples/platforms/ubuntu/default ]]
#0 0.554 +++ . examples/platforms/ubuntu/default
#0 0.554 ++++ NAT64=1
#0 0.554 ++++ DNS64=0
#0 0.554 ++++ DHCPV6_PD=0
#0 0.554 ++++ NETWORK_MANAGER=0
#0 0.554 ++++ BACKBONE_ROUTER=1
#0 0.554 ++++ BORDER_ROUTING=1
#0 0.554 ++++ WEB_GUI=1
#0 0.554 ++++ REST_API=1
#0 0.554 +++ eval echo '${DHCPV6_PD-}'
#0 0.554 ++++ echo 0
#0 0.555 ++ value=0
#0 0.555 ++ [[ 0 == 1 ]]
#0 0.555 + . script/_network_manager
#0 0.555 ++ AP_CONN=BorderRouter-AP
#0 0.555 ++ ETH_CONN=BorderRouter-Eth
#0 0.555 ++ AP_HELPER_SCRIPT=/etc/NetworkManager/dispatcher.d/ap-helper
#0 0.555 ++ DHCPV6_HELPER_SCRIPT=/etc/NetworkManager/dispatcher.d/dhcpv6-helper
#0 0.556 + . script/_rt_tables
#0 0.556 + . script/_swapfile
#0 0.556 ++ SWAP_REQUIRED=false
#0 0.556 ++ SWAP_FILENAME=/swapfile
#0 0.556 ++ SWAP_BLOCK_SIZE=1M
#0 0.556 ++ SWAP_BLOCK_CNT=1024
#0 0.556 + . script/_sudo_extend
#0 0.556 ++ ETC_SUDOERS=/etc/sudoers
#0 0.556 ++ SUDO_EXTEND_TIME=false
#0 0.556 ++ SUDO_EXTEND_TIME_AMOUNT=120
#0 0.556 + . script/_disable_services
#0 0.557 + . script/_firewall
#0 0.557 ++ FIREWALL_SERVICE=/etc/init.d/otbr-firewall
#0 0.557 ++ sudo modprobe ip6table_filter
#0 0.569 sudo: modprobe: command not found
#0 0.569 ++ true
#0 0.569 + main
#0 0.570 + . /dev/null
#0 0.570 + extend_sudo_timeout
#0 0.570 + local _why
#0 0.570 + _why=Disabled
#0 0.570 + false
#0 0.570 + false
#0 0.570 + echo 'sudo-timeout: Not extending, Disabled'
#0 0.570 sudo-timeout: Not extending, Disabled
#0 0.570 + setup_swapfile
#0 0.570 + false
#0 0.570 + echo 'Swapfile: not required'
#0 0.570 + disable_services
#0 0.570 + case $PLATFORM in
#0 0.570 + echo 'Nothing to disable'
#0 0.570 + otbr_uninstall
#0 0.570 + have systemctl
#0 0.570 + command -v systemctl
#0 0.570 Swapfile: not required
#0 0.570 + sudo killall otbr-web otbr-agent
#0 0.573 sudo: killall: command not found
#0 0.574 + true
#0 0.574 + cd /app/build/otbr
#0 0.575 script/_otbr: line 52: cd: /app/build/otbr: No such file or directory
#0 0.575 + have systemctl
#0 0.575 + command -v systemctl
#0 0.575 + border_routing_uninstall
#0 0.575 + with BORDER_ROUTING
#0 0.575 + local value
#0 0.576 ++ printenv BORDER_ROUTING
#0 0.576 + value=1
#0 0.576 + [[ -z 1 ]]
#0 0.576 + [[ 1 == 1 ]]
#0 0.576 + accept_ra_uninstall
#0 0.576 + test '!' -f /etc/sysctl.d/60-otbr-accept-ra.conf
#0 0.576 + dhcpcd_enable_ipv6
#0 0.577 + '[' -f /etc/dhcpcd.conf.orig ']'
#0 0.577 + network_manager_uninstall
#0 0.577 + with NETWORK_MANAGER
#0 0.577 + local value
#0 0.577 ++ printenv NETWORK_MANAGER
#0 0.578 + value=
#0 0.578 + [[ -z '' ]]
#0 0.578 + [[ -f examples/platforms/ubuntu/default ]]
#0 0.578 ++ . examples/platforms/ubuntu/default
#0 0.578 +++ NAT64=1
#0 0.578 +++ DNS64=0
#0 0.578 +++ DHCPV6_PD=0
#0 0.579 +++ NETWORK_MANAGER=0
#0 0.579 +++ BACKBONE_ROUTER=1
#0 0.579 +++ BORDER_ROUTING=1
#0 0.579 +++ WEB_GUI=1
#0 0.579 +++ REST_API=1
#0 0.579 ++ eval echo '${NETWORK_MANAGER-}'
#0 0.579 +++ echo 0
#0 0.579 + value=0
#0 0.579 + [[ 0 == 1 ]]
#0 0.579 + return 0
#0 0.579 + dhcpv6_pd_uninstall
#0 0.579 + with DHCPV6_PD
#0 0.579 + local value
#0 0.579 ++ printenv DHCPV6_PD
#0 0.580 + value=
#0 0.580 + [[ -z '' ]]
#0 0.580 + [[ -f examples/platforms/ubuntu/default ]]
#0 0.580 ++ . examples/platforms/ubuntu/default
#0 0.580 +++ NAT64=1
#0 0.580 +++ DNS64=0
#0 0.581 +++ DHCPV6_PD=0
#0 0.581 +++ NETWORK_MANAGER=0
#0 0.581 +++ BACKBONE_ROUTER=1
#0 0.581 +++ BORDER_ROUTING=1
#0 0.581 +++ WEB_GUI=1
#0 0.581 +++ REST_API=1
#0 0.581 ++ eval echo '${DHCPV6_PD-}'
#0 0.581 +++ echo 0
#0 0.581 + value=0
#0 0.581 + [[ 0 == 1 ]]
#0 0.581 + return 0
#0 0.581 + nat64_uninstall
#0 0.581 + with NAT64
#0 0.581 + local value
#0 0.582 ++ printenv NAT64
#0 0.582 + value=1
#0 0.582 + [[ -z 1 ]]
#0 0.582 + [[ 1 == 1 ]]
#0 0.582 + nat64_stop
#0 0.582 + with NAT64
#0 0.582 + local value
#0 0.583 ++ printenv NAT64
#0 0.583 + value=1
#0 0.583 + [[ -z 1 ]]
#0 0.583 + [[ 1 == 1 ]]
#0 0.583 + '[' openthread = tayga ']'
#0 0.584 + nat44_stop
#0 0.584 + with DOCKER
#0 0.584 + local value
#0 0.584 ++ printenv DOCKER
#0 0.585 + value=1
#0 0.585 + [[ -z 1 ]]
#0 0.585 + [[ 1 == 1 ]]
#0 0.585 + service otbr-nat44 stop
#0 0.587 otbr-nat44: unrecognized service
#0 0.587 + true
#0 0.587 + '[' openthread = tayga ']'
#0 0.587 + nat44_uninstall
#0 0.587 + have systemctl
#0 0.587 + command -v systemctl
#0 0.588 + have update-rc.d
#0 0.588 + command -v update-rc.d
#0 0.588 + sudo update-rc.d otbr-nat44 remove
#0 0.641 + test '!' -f /etc/init.d/otbr-nat44
#0 0.641 + dns64_uninstall
#0 0.642 + with NAT64
#0 0.642 + local value
#0 0.642 ++ printenv NAT64
#0 0.643 + value=1
#0 0.643 + [[ -z 1 ]]
#0 0.643 + [[ 1 == 1 ]]
#0 0.643 + with DNS64
#0 0.643 + local value
#0 0.644 ++ printenv DNS64
#0 0.644 + value=0
#0 0.644 + [[ -z 0 ]]
#0 0.644 + [[ 0 == 1 ]]
#0 0.644 + return 0
#0 0.644 + rt_tables_uninstall
#0 0.644 + with BACKBONE_ROUTER
#0 0.644 + local value
#0 0.644 ++ printenv BACKBONE_ROUTER
#0 0.645 + value=1
#0 0.645 + [[ -z 1 ]]
#0 0.645 + [[ 1 == 1 ]]
#0 0.645 + sudo sed -i.bak '/88\s\+openthread/d' /etc/iproute2/rt_tables
#0 0.674 + ipforward_uninstall
#0 0.674 + test '!' -f /etc/sysctl.d/60-otbr-ip-forward.conf
#0 0.674 + firewall_uninstall
#0 0.674 + firewall_stop
#0 0.674 + with DOCKER
#0 0.674 + local value
#0 0.674 ++ printenv DOCKER
#0 0.675 + value=1
#0 0.675 + [[ -z 1 ]]
#0 0.675 + [[ 1 == 1 ]]
#0 0.675 + service otbr-firewall stop
#0 0.677 otbr-firewall: unrecognized service
#0 0.677 + true
#0 0.677 + have systemctl
#0 0.677 + command -v systemctl
#0 0.677 + have update-rc.d
#0 0.677 + command -v update-rc.d
#0 0.677 + sudo update-rc.d otbr-firewall remove
#0 0.688 + test '!' -f /etc/init.d/otbr-firewall
#0 0.688 + firewall_install
#0 0.688 + sudo cp script/otbr-firewall /etc/init.d/otbr-firewall
#0 0.697 + sudo chmod a+x /etc/init.d/otbr-firewall
#0 0.702 + have systemctl
#0 0.702 + command -v systemctl
#0 0.702 + ipforward_install
#0 0.702 + sudo tee /etc/sysctl.d/60-otbr-ip-forward.conf
#0 0.708 net.ipv6.conf.all.forwarding = 1
#0 0.708 net.ipv4.ip_forward = 1
#0 0.709 + without DOCKER
#0 0.709 + with DOCKER
#0 0.709 + local value
#0 0.709 ++ printenv DOCKER
#0 0.710 + value=1
#0 0.710 + [[ -z 1 ]]
#0 0.710 + [[ 1 == 1 ]]
#0 0.710 + rt_tables_install
#0 0.710 + with BACKBONE_ROUTER
#0 0.710 + local value
#0 0.711 ++ printenv BACKBONE_ROUTER
#0 0.711 + value=1
#0 0.711 + [[ -z 1 ]]
#0 0.711 + [[ 1 == 1 ]]
#0 0.711 + rt_tables_uninstall
#0 0.711 + with BACKBONE_ROUTER
#0 0.711 + local value
#0 0.712 ++ printenv BACKBONE_ROUTER
#0 0.712 + value=1
#0 0.712 + [[ -z 1 ]]
#0 0.712 + [[ 1 == 1 ]]
#0 0.712 + sudo sed -i.bak '/88\s\+openthread/d' /etc/iproute2/rt_tables
#0 0.718 + sudo sh -c 'echo "88 openthread" >>/etc/iproute2/rt_tables'
#0 0.723 + without DOCKER
#0 0.723 + with DOCKER
#0 0.723 + local value
#0 0.723 ++ printenv DOCKER
#0 0.724 + value=1
#0 0.724 + [[ -z 1 ]]
#0 0.724 + [[ 1 == 1 ]]
#0 0.724 + nat64_install
#0 0.724 + with NAT64
#0 0.724 + local value
#0 0.724 ++ printenv NAT64
#0 0.725 + value=1
#0 0.725 + [[ -z 1 ]]
#0 0.725 + [[ 1 == 1 ]]
#0 0.725 + '[' openthread = tayga ']'
#0 0.725 + nat44_install
#0 0.725 + sudo tee /etc/init.d/otbr-nat44
#0 0.729 #! /bin/sh
#0 0.729 #
#0 0.729 #  Copyright (c) 2017, The OpenThread Authors.
#0 0.729 #  All rights reserved.
#0 0.729 #
#0 0.729 #  Redistribution and use in source and binary forms, with or without
#0 0.729 #  modification, are permitted provided that the following conditions are met:
#0 0.729 #  1. Redistributions of source code must retain the above copyright
#0 0.729 #     notice, this list of conditions and the following disclaimer.
#0 0.729 #  2. Redistributions in binary form must reproduce the above copyright
#0 0.729 #     notice, this list of conditions and the following disclaimer in the
#0 0.729 #     documentation and/or other materials provided with the distribution.
#0 0.729 #  3. Neither the name of the copyright holder nor the
#0 0.729 #     names of its contributors may be used to endorse or promote products
#0 0.729 #     derived from this software without specific prior written permission.
#0 0.729 #
#0 0.729 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
#0 0.729 #  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#0 0.729 #  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
#0 0.729 #  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
#0 0.729 #  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
#0 0.729 #  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
#0 0.729 #  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
#0 0.729 #  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
#0 0.729 #  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
#0 0.729 #  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#0 0.729 #  POSSIBILITY OF SUCH DAMAGE.
#0 0.729 #
#0 0.729 ### BEGIN INIT INFO
#0 0.729 # Provides:          otbr-nat44
#0 0.729 # Required-Start:
#0 0.729 # Required-Stop:
#0 0.729 # Should-Start:
#0 0.729 # Should-Stop:
#0 0.729 # Default-Start:     2 3 4 5
#0 0.729 # Default-Stop:
#0 0.729 # Short-Description: iptables NAT44
#0 0.729 # Description:       NAT44 is require for OpenThread border router
#0 0.729 #                    to connect to arbitrary IPv4 endpoints.
#0 0.729 ### END INIT INFO
#0 0.729 
#0 0.729 . /lib/lsb/init-functions
#0 0.729 . /lib/init/vars.sh
#0 0.729 
#0 0.729 case "$1" in
#0 0.729     start)
#0 0.730 + '[' openthread = tayga ']'
#0 0.730 + sudo tee -a /etc/init.d/otbr-nat44
#0 0.730 + echo '        iptables -t nat -A POSTROUTING -s "192.168.255.0/24" -j MASQUERADE'
#0 0.734         iptables -t nat -A POSTROUTING -s "192.168.255.0/24" -j MASQUERADE
#0 0.735 + for IFNAME in $WLAN_IFNAMES
#0 0.735 + sudo tee -a /etc/init.d/otbr-nat44
#0 0.735 + echo '        iptables -t filter -A FORWARD -o eth0 -j ACCEPT'
#0 0.739         iptables -t filter -A FORWARD -o eth0 -j ACCEPT
#0 0.740 + echo '        iptables -t filter -A FORWARD -i eth0 -j ACCEPT'
#0 0.740 + sudo tee -a /etc/init.d/otbr-nat44
#0 0.743         iptables -t filter -A FORWARD -i eth0 -j ACCEPT
#0 0.744 + sudo tee -a /etc/init.d/otbr-nat44
#0 0.748         ;;
#0 0.748     restart|reload|force-reload)
#0 0.748         echo "Error: argument '$1' not supported" >&2
#0 0.748         exit 3
#0 0.748         ;;
#0 0.748     stop|status)
#0 0.748         # No-op
#0 0.748         ;;
#0 0.748     *)
#0 0.748         echo "Usage: $0 start|stop" >&2
#0 0.748         exit 3
#0 0.748         ;;
#0 0.748 esac
#0 0.749 + sudo chmod a+x /etc/init.d/otbr-nat44
#0 0.754 + have systemctl
#0 0.754 + command -v systemctl
#0 0.754 + dns64_install
#0 0.754 + with NAT64
#0 0.754 + local value
#0 0.757 ++ printenv NAT64
#0 0.757 + value=1
#0 0.757 + [[ -z 1 ]]
#0 0.757 + [[ 1 == 1 ]]
#0 0.757 + with DNS64
#0 0.757 + local value
#0 0.757 ++ printenv DNS64
#0 0.757 + value=0
#0 0.757 + [[ -z 0 ]]
#0 0.757 + [[ 0 == 1 ]]
#0 0.757 + return 0
#0 0.757 + network_manager_install
#0 0.757 + with NETWORK_MANAGER
#0 0.757 + local value
#0 0.757 ++ printenv NETWORK_MANAGER
#0 0.758 + value=
#0 0.758 + [[ -z '' ]]
#0 0.758 + [[ -f examples/platforms/ubuntu/default ]]
#0 0.758 ++ . examples/platforms/ubuntu/default
#0 0.758 +++ NAT64=1
#0 0.758 +++ DNS64=0
#0 0.758 +++ DHCPV6_PD=0
#0 0.758 +++ NETWORK_MANAGER=0
#0 0.758 +++ BACKBONE_ROUTER=1
#0 0.758 +++ BORDER_ROUTING=1
#0 0.758 +++ WEB_GUI=1
#0 0.758 +++ REST_API=1
#0 0.758 ++ eval echo '${NETWORK_MANAGER-}'
#0 0.758 +++ echo 0
#0 0.759 + value=0
#0 0.759 + [[ 0 == 1 ]]
#0 0.759 + return 0
#0 0.759 + dhcpv6_pd_install
#0 0.759 + with DHCPV6_PD
#0 0.759 + local value
#0 0.759 ++ printenv DHCPV6_PD
#0 0.760 + value=
#0 0.760 + [[ -z '' ]]
#0 0.760 + [[ -f examples/platforms/ubuntu/default ]]
#0 0.760 ++ . examples/platforms/ubuntu/default
#0 0.761 +++ NAT64=1
#0 0.761 +++ DNS64=0
#0 0.761 +++ DHCPV6_PD=0
#0 0.761 +++ NETWORK_MANAGER=0
#0 0.761 +++ BACKBONE_ROUTER=1
#0 0.761 +++ BORDER_ROUTING=1
#0 0.761 +++ WEB_GUI=1
#0 0.761 +++ REST_API=1
#0 0.761 ++ eval echo '${DHCPV6_PD-}'
#0 0.761 +++ echo 0
#0 0.761 + value=0
#0 0.761 + [[ 0 == 1 ]]
#0 0.761 + return 0
#0 0.761 + border_routing_install
#0 0.761 + with BORDER_ROUTING
#0 0.761 + local value
#0 0.761 ++ printenv BORDER_ROUTING
#0 0.762 + value=1
#0 0.762 + [[ -z 1 ]]
#0 0.762 + [[ 1 == 1 ]]
#0 0.762 + dhcpcd_disable_ipv6
#0 0.762 + '[' -f /etc/dhcpcd.conf ']'
#0 0.762 + accept_ra_install
#0 0.762 + sudo tee /etc/sysctl.d/60-otbr-accept-ra.conf
#0 0.766 net.ipv6.conf.eth0.accept_ra = 2
#0 0.766 net.ipv6.conf.eth0.accept_ra_rt_info_max_plen = 64
#0 0.767 + without DOCKER
#0 0.767 + with DOCKER
#0 0.767 + local value
#0 0.768 ++ printenv DOCKER
#0 0.768 + value=1
#0 0.768 + [[ -z 1 ]]
#0 0.769 + [[ 1 == 1 ]]
#0 0.769 + otbr_install
#0 0.769 + otbr_options=()
#0 0.769 + local otbr_options
#0 0.769 + [[ -n '' ]]
#0 0.769 + otbr_options=("-DBUILD_TESTING=OFF" "-DCMAKE_INSTALL_PREFIX=/usr" "-DOTBR_DBUS=ON" "-DOTBR_DNSSD_DISCOVERY_PROXY=ON" "-DOTBR_SRP_ADVERTISING_PROXY=ON" "-DOTBR_INFRA_IF_NAME=${INFRA_IF_NAME}" "-DOTBR_MDNS=${OTBR_MDNS:=mDNSResponder}" "-DOTBR_VERSION=" "-DOT_PACKAGE_VERSION=" "${otbr_options[@]}")
#0 0.769 + with WEB_GUI
#0 0.769 + local value
#0 0.769 ++ printenv WEB_GUI
#0 0.770 + value=1
#0 0.770 + [[ -z 1 ]]
#0 0.770 + [[ 1 == 1 ]]
#0 0.770 + otbr_options+=("-DOTBR_WEB=ON")
#0 0.770 + with BORDER_ROUTING
#0 0.770 + local value
#0 0.771 ++ printenv BORDER_ROUTING
#0 0.771 + value=1
#0 0.771 + [[ -z 1 ]]
#0 0.771 + [[ 1 == 1 ]]
#0 0.771 + otbr_options+=("-DOTBR_BORDER_ROUTING=ON")
#0 0.771 + with REST_API
#0 0.771 + local value
#0 0.772 ++ printenv REST_API
#0 0.772 + value=1
#0 0.772 + [[ -z 1 ]]
#0 0.772 + [[ 1 == 1 ]]
#0 0.772 + otbr_options+=("-DOTBR_REST=ON")
#0 0.772 + with BACKBONE_ROUTER
#0 0.772 + local value
#0 0.773 ++ printenv BACKBONE_ROUTER
#0 0.773 + value=1
#0 0.774 + [[ -z 1 ]]
#0 0.774 + [[ 1 == 1 ]]
#0 0.774 + otbr_options+=("-DOTBR_BACKBONE_ROUTER=ON")
#0 0.774 + [[ 0 == \1 ]]
#0 0.774 + [[ 0 == \1 ]]
#0 0.774 + with NAT64
#0 0.774 + local value
#0 0.774 ++ printenv NAT64
#0 0.775 + value=1
#0 0.775 + [[ -z 1 ]]
#0 0.775 + [[ 1 == 1 ]]
#0 0.775 + [[ openthread == \o\p\e\n\t\h\r\e\a\d ]]
#0 0.775 + otbr_options+=("-DOTBR_NAT64=ON" "-DOT_POSIX_NAT64_CIDR=${NAT64_DYNAMIC_POOL:-192.168.255.0/24}")
#0 0.775 + ./script/cmake-build -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr -DOTBR_DBUS=ON -DOTBR_DNSSD_DISCOVERY_PROXY=ON -DOTBR_SRP_ADVERTISING_PROXY=ON -DOTBR_INFRA_IF_NAME=eth0 -DOTBR_MDNS=mDNSResponder -DOTBR_VERSION= -DOT_PACKAGE_VERSION= -DOTBR_WEB=ON -DOTBR_BORDER_ROUTING=ON -DOTBR_REST=ON -DOTBR_BACKBONE_ROUTER=ON -DOTBR_NAT64=ON -DOT_POSIX_NAT64_CIDR=192.168.255.0/24
#0 0.778 +++ dirname ./script/cmake-build
#0 0.779 ++ cd ./script/..
#0 0.779 ++ [[ ! -n x ]]
#0 0.779 ++ echo 'Current platform is ubuntu'
#0 0.779 Current platform is ubuntu
#0 0.779 ++ with BORDER_ROUTING
#0 0.779 ++ local value
#0 0.780 +++ printenv BORDER_ROUTING
#0 0.781 ++ value=1
#0 0.781 ++ [[ -z 1 ]]
#0 0.781 ++ [[ 1 == 1 ]]
#0 0.781 ++ with DHCPV6_PD
#0 0.781 ++ local value
#0 0.781 +++ printenv DHCPV6_PD
#0 0.782 ++ value=
#0 0.782 ++ [[ -z '' ]]
#0 0.782 ++ [[ -f examples/platforms/ubuntu/default ]]
#0 0.782 +++ . examples/platforms/ubuntu/default
#0 0.783 ++++ NAT64=1
#0 0.783 ++++ DNS64=0
#0 0.783 ++++ DHCPV6_PD=0
#0 0.783 ++++ NETWORK_MANAGER=0
#0 0.783 ++++ BACKBONE_ROUTER=1
#0 0.783 ++++ BORDER_ROUTING=1
#0 0.783 ++++ WEB_GUI=1
#0 0.783 ++++ REST_API=1
#0 0.783 +++ eval echo '${DHCPV6_PD-}'
#0 0.783 ++++ echo 0
#0 0.783 ++ value=0
#0 0.783 ++ [[ 0 == 1 ]]
#0 0.783 ++ with BORDER_ROUTING
#0 0.783 ++ local value
#0 0.783 +++ printenv BORDER_ROUTING
#0 0.784 ++ value=1
#0 0.784 ++ [[ -z 1 ]]
#0 0.784 ++ [[ 1 == 1 ]]
#0 0.784 ++ with NETWORK_MANAGER
#0 0.784 ++ local value
#0 0.785 +++ printenv NETWORK_MANAGER
#0 0.786 ++ value=
#0 0.786 ++ [[ -z '' ]]
#0 0.786 ++ [[ -f examples/platforms/ubuntu/default ]]
#0 0.786 +++ . examples/platforms/ubuntu/default
#0 0.786 ++++ NAT64=1
#0 0.786 ++++ DNS64=0
#0 0.786 ++++ DHCPV6_PD=0
#0 0.786 ++++ NETWORK_MANAGER=0
#0 0.786 ++++ BACKBONE_ROUTER=1
#0 0.786 ++++ BORDER_ROUTING=1
#0 0.786 ++++ WEB_GUI=1
#0 0.786 ++++ REST_API=1
#0 0.786 +++ eval echo '${NETWORK_MANAGER-}'
#0 0.787 ++++ echo 0
#0 0.787 ++ value=0
#0 0.787 ++ [[ 0 == 1 ]]
#0 0.787 ++ STAGE_DIR=/app/stage
#0 0.787 ++ BUILD_DIR=/app/build
#0 0.787 ++ [[ -d /app/stage ]]
#0 0.787 ++ [[ -d /app/build ]]
#0 0.787 ++ export PATH=/app/stage/usr/bin:/app/stage/usr/sbin:/app/stage/usr/bin:/app/stage/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#0 0.787 ++ PATH=/app/stage/usr/bin:/app/stage/usr/sbin:/app/stage/usr/bin:/app/stage/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#0 0.787 +++ basename ./script/cmake-build
#0 0.788 ++ TASKNAME=cmake-build
#0 0.788 ++ BEFORE_HOOK=examples/platforms/ubuntu/before_cmake-build
#0 0.789 ++ AFTER_HOOK=examples/platforms/ubuntu/after_cmake-build
#0 0.789 ++ [[ ! -f examples/platforms/ubuntu/before_cmake-build ]]
#0 0.789 ++ BEFORE_HOOK=/dev/null
#0 0.789 ++ [[ ! -f examples/platforms/ubuntu/after_cmake-build ]]
#0 0.789 ++ AFTER_HOOK=/dev/null
#0 0.789 + OTBR_TOP_SRCDIR=/app
#0 0.789 + readonly OTBR_TOP_SRCDIR
#0 0.789 + OTBR_TOP_BUILD_DIR=/app/build/otbr
#0 0.789 + readonly OTBR_TOP_BUILD_DIR
#0 0.789 + OTBR_TARGET=
#0 0.789 + main -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr -DOTBR_DBUS=ON -DOTBR_DNSSD_DISCOVERY_PROXY=ON -DOTBR_SRP_ADVERTISING_PROXY=ON -DOTBR_INFRA_IF_NAME=eth0 -DOTBR_MDNS=mDNSResponder -DOTBR_VERSION= -DOT_PACKAGE_VERSION= -DOTBR_WEB=ON -DOTBR_BORDER_ROUTING=ON -DOTBR_REST=ON -DOTBR_BACKBONE_ROUTER=ON -DOTBR_NAT64=ON -DOT_POSIX_NAT64_CIDR=192.168.255.0/24
#0 0.790 + local builddir=/app/build/otbr
#0 0.790 + mkdir -p /app/build/otbr
#0 0.793 + cd /app/build/otbr
#0 0.793 + cmake -GNinja /app -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr -DOTBR_DBUS=ON -DOTBR_DNSSD_DISCOVERY_PROXY=ON -DOTBR_SRP_ADVERTISING_PROXY=ON -DOTBR_INFRA_IF_NAME=eth0 -DOTBR_MDNS=mDNSResponder -DOTBR_VERSION= -DOT_PACKAGE_VERSION= -DOTBR_WEB=ON -DOTBR_BORDER_ROUTING=ON -DOTBR_REST=ON -DOTBR_BACKBONE_ROUTER=ON -DOTBR_NAT64=ON -DOT_POSIX_NAT64_CIDR=192.168.255.0/24
#0 0.909 -- The C compiler identification is GNU 7.5.0
#0 1.046 -- The CXX compiler identification is GNU 7.5.0
#0 1.049 -- Check for working C compiler: /usr/bin/cc
#0 1.093 -- Check for working C compiler: /usr/bin/cc -- works
#0 1.094 -- Detecting C compiler ABI info
#0 1.140 -- Detecting C compiler ABI info - done
#0 1.145 -- Detecting C compile features
#0 1.276 -- Detecting C compile features - done
#0 1.279 -- Check for working CXX compiler: /usr/bin/c++
#0 1.333 -- Check for working CXX compiler: /usr/bin/c++ -- works
#0 1.334 -- Detecting CXX compiler ABI info
#0 1.387 -- Detecting CXX compiler ABI info - done
#0 1.391 -- Detecting CXX compile features
#0 1.641 -- Detecting CXX compile features - done
#0 1.645 -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
#0 1.645 -- Checking for module 'dbus-1'
#0 1.659 --   Found dbus-1, version 1.12.2
#0 1.684 -- OTBR package name: OpenThread_BorderRouter
#0 1.712 -- Version: 0.3.0-c012ce8e61
#0 1.715 -- Checking for module 'systemd'
#0 1.717 --   No package 'systemd' found
#0 1.719 CMake Error at third_party/openthread/CMakeLists.txt:95 (add_subdirectory):
#0 1.719   The source directory
#0 1.719 
#0 1.719     /app/third_party/openthread/repo
#0 1.719 
#0 1.719   does not contain a CMakeLists.txt file.
#0 1.719 
#0 1.719 
#0 1.719 CMake Error at third_party/openthread/CMakeLists.txt:97 (target_compile_definitions):
#0 1.719   Cannot specify compile definitions for target "ot-config" which is not
#0 1.719   built by this project.
#0 1.719 
#0 1.719 
#0 1.719 CMake Error at third_party/openthread/CMakeLists.txt:106 (target_compile_definitions):
#0 1.719   Cannot specify compile definitions for target "ot-config" which is not
#0 1.719   built by this project.
#0 1.719 
#0 1.719 
#0 1.720 CMake Error at third_party/cJSON/CMakeLists.txt:34 (add_subdirectory):
#0 1.720   The source directory
#0 1.720 
#0 1.720     /app/third_party/cJSON/repo
#0 1.720 
#0 1.720   does not contain a CMakeLists.txt file.
#0 1.720 
#0 1.720 
#0 1.720 CMake Error at third_party/cJSON/CMakeLists.txt:36 (target_include_directories):
#0 1.720   Cannot specify include directories for target "cjson" which is not built by
#0 1.720   this project.
#0 1.720 
#0 1.720 
#0 1.723 -- Checking for module 'libsystemd'
#0 1.725 --   No package 'libsystemd' found
#0 1.731 -- Checking for module 'jsoncpp'
#0 1.740 --   Found jsoncpp, version 1.7.4
#0 1.797 -- Boost version: 1.65.1
#0 1.797 -- Found the following Boost libraries:
#0 1.797 --   filesystem
#0 1.797 --   system
#0 1.817 -- Configuring incomplete, errors occurred!
#0 1.817 See also "/app/build/otbr/CMakeFiles/CMakeOutput.log".
------
Dockerfile:95
--------------------
  93 |     RUN ./script/bootstrap
  94 |     COPY . .
  95 | >>> RUN ./script/setup
  96 |     
  97 |     RUN ([ "${DNS64}" = "0" ] || chmod 644 /etc/bind/named.conf.options) \
--------------------
ERROR: failed to solve: process "/bin/sh -c ./script/setup" did not complete successfully: exit code: 1

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (13 by maintainers)

Most upvoted comments

@caipiblack Yes the resulting image works. As a further optimization, combine all the RUN commands into a single run. It saves about 800MB in the resulting image. Diff below.

diff --git a/etc/docker/Dockerfile b/etc/docker/Dockerfile
index eef7a948d8..aa53f829fc 100644
--- a/etc/docker/Dockerfile
+++ b/etc/docker/Dockerfile
@@ -84,20 +84,18 @@ ENV OTBR_OT_BACKBONE_CI_DEPS curl lcov wget build-essential python3-dbus python3
 ENV OTBR_NORELEASE_DEPS \
   cpputest-dev
 
-RUN apt-get update \
-  && apt-get install --no-install-recommends -y $OTBR_DOCKER_REQS $OTBR_DOCKER_DEPS \
-  && ([ "${OT_BACKBONE_CI}" != "1" ] || apt-get install --no-install-recommends -y $OTBR_OT_BACKBONE_CI_DEPS) \
-  && ln -fs /usr/share/zoneinfo/UTC /etc/localtime
-
 COPY ./script /app/script
 COPY ./third_party/mDNSResponder /app/third_party/mDNSResponder
+COPY . /app
 WORKDIR /app
 
-RUN ./script/bootstrap
-COPY . .
-RUN ./script/setup
-
-RUN ([ "${DNS64}" = "0" ] || chmod 644 /etc/bind/named.conf.options) \
+RUN apt-get update \
+  && apt-get install --no-install-recommends -y $OTBR_DOCKER_REQS $OTBR_DOCKER_DEPS \
+  && ([ "${OT_BACKBONE_CI}" != "1" ] || apt-get install --no-install-recommends -y $OTBR_OT_BACKBONE_CI_DEPS) \
+  && ln -fs /usr/share/zoneinfo/UTC /etc/localtime \
+  && ./script/bootstrap \
+  && ./script/setup \
+  && ([ "${DNS64}" = "0" ] || chmod 644 /etc/bind/named.conf.options) \
   && ([ "${OT_BACKBONE_CI}" = "1" ] || ( \
     mv ./script /tmp \
     && mv ./etc /tmp \
 && mv ./etc /tmp \