# 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}
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
# 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
# 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
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