From cdad5e2a028af3834e18dc8fda77b23c8c80d2a5 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Sun, 2 Oct 2022 16:59:05 +0800 Subject: [PATCH] 221002-legacy --- Dockerfile | 2 +- Vagrantfile | 9 ++++++++- ufw-docker | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index eee76c2..074a5ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:20.04 ARG docker_version="20.10.17" diff --git a/Vagrantfile b/Vagrantfile index 67d7d50..ced906d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,14 @@ ENV['VAGRANT_NO_PARALLEL']="true" Vagrant.configure('2') do |config| - config.vm.box = "chaifeng/ubuntu-22.04-docker-20.10.17#{(`uname -m`.strip == "arm64")?"-arm64":""}" + docker_version = "20.10.17" + + ubuntu_version = File.readlines("Dockerfile").filter { |line| + line.start_with?("FROM ") + }.first.match(/\d\d\.\d\d/)[0] + + config.vm.box = "chaifeng/ubuntu-#{ubuntu_version}-docker-#{docker_version}#{(`uname -m`.strip == "arm64")?"-arm64":""}" + #config.vm.box = "chaifeng/ubuntu-20.04-docker-20.10.17#{(`uname -m`.strip == "arm64")?"-arm64":""}" config.vm.provider 'virtualbox' do |vb| diff --git a/ufw-docker b/ufw-docker index 5568e11..dffc501 100755 --- a/ufw-docker +++ b/ufw-docker @@ -11,7 +11,7 @@ GREP_REGEXP_INSTANCE_NAME="[-_.[:alnum:]]\\+" DEFAULT_PROTO=tcp ufw_docker_agent=ufw-docker-agent -ufw_docker_agent_image="${UFW_DOCKER_AGENT_IMAGE:-chaifeng/${ufw_docker_agent}:220920-nf_tables}" +ufw_docker_agent_image="${UFW_DOCKER_AGENT_IMAGE:-chaifeng/${ufw_docker_agent}:221002-legacy}" if [[ "${ufw_docker_agent_image}" = *-@(legacy|nf_tables) ]]; then if iptables --version | grep -F '(legacy)' &>/dev/null; then