Update base image to openwrt1907 58/4458/2
authorLe Yao <le.yao@intel.com>
Fri, 24 Sep 2021 02:05:52 +0000 (02:05 +0000)
committerLe Yao <le.yao@intel.com>
Fri, 24 Sep 2021 02:21:43 +0000 (02:21 +0000)
Signed-off-by: Le Yao <le.yao@intel.com>
Change-Id: I6787fb78b1890fd0616766535f7f110f56f41bf0

platform/cnf-openwrt/src/Dockerfile_sdewan.tpl [moved from platform/cnf-openwrt/src/Dockerfile_1806_mwan3.tpl with 89% similarity]
platform/cnf-openwrt/src/Dockerfile_sdewan_noproxy.tpl [moved from platform/cnf-openwrt/src/Dockerfile_1806_mwan3_noproxy.tpl with 87% similarity]
platform/cnf-openwrt/src/build_image.sh

@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: Apache-2.0
 # Copyright (c) 2021 Intel Corporation
-FROM openwrt-1806-4-base:v0.1
+
+FROM openwrtorg/rootfs:x86-64-openwrt-19.07
 
 #EXPOSE 80
 ENV http_proxy={docker_proxy}
@@ -9,12 +10,12 @@ ENV no_proxy=localhost,120.0.0.1,192.168.*
 
 RUN mkdir /var/lock && \
     opkg update && \
-    opkg install shadow-chpasswd && \
+    opkg install shadow-chpasswd sudo && \
     opkg install luci-ssl && \
     opkg install uhttpd-mod-lua && \
     uci set uhttpd.main.interpreter='.lua=/usr/bin/lua' && \
     uci commit uhttpd && \
-    opkg install shadow-useradd shadow-groupadd shadow-usermod sudo && \
+    opkg install shadow-useradd shadow-groupadd shadow-usermod  && \
     opkg install mwan3 jq bash conntrack && \
     opkg install strongswan-default luasocket && \
     opkg install luci-app-mwan3; exit 0
@@ -1,18 +1,18 @@
 # SPDX-License-Identifier: Apache-2.0
 # Copyright (c) 2021 Intel Corporation
 
-FROM openwrt-1806-4-base:v0.1
+FROM openwrtorg/rootfs:x86-64-openwrt-19.07
 
 #EXPOSE 80
 
 RUN mkdir /var/lock && \
     opkg update && \
-    opkg install shadow-chpasswd && \
+    opkg install shadow-chpasswd sudo && \
     opkg install luci-ssl && \
     opkg install uhttpd-mod-lua && \
     uci set uhttpd.main.interpreter='.lua=/usr/bin/lua' && \
     uci commit uhttpd && \
-    opkg install shadow-useradd shadow-groupadd shadow-usermod sudo && \
+    opkg install shadow-useradd shadow-groupadd shadow-usermod && \
     opkg install mwan3 jq bash conntrack && \
     opkg install strongswan-default luasocket && \
     opkg install luci-app-mwan3; exit 0
index dd5dc08..6c8aa15 100644 (file)
@@ -6,22 +6,8 @@
 # usage: build_images.sh
 
 set -ex
-base_image_tag=openwrt-1806-4-base:v0.1
-docker_file=Dockerfile_1806_mwan3
-image_tag=openwrt-1806-mwan3:v0.1
-package=openwrt-18.06.4-x86-64-generic-rootfs
-
-# build openwrt base docker images
-base_image=$(docker images | grep $base_image_tag | awk '{print $1}')
-if [ -z "$base_image" ]; then
-    # download driver source package
-    if [ ! -e /tmp/$package.tar.gz ]; then
-        wget -P /tmp https://downloads.openwrt.org/releases/18.06.4/targets/x86/64/$package.tar.gz
-    fi
-    cp /tmp/$package.tar.gz .
-
-    docker import $package.tar.gz $base_image_tag
-fi
+docker_file=Dockerfile_sdewan
+image_tag=openwrt-sdewan:v0.1
 
 # generate Dockerfile
 test -f ./set_proxy && . set_proxy
@@ -37,6 +23,4 @@ fi
 docker build --network=host -f $docker_file -t $image_tag .
 
 # clear
-docker image rm $base_image_tag
 rm -rf $docker_file
-rm -rf $package.tar.gz