浏览代码

Update container memery

master
haskal 11 个月前
父节点
当前提交
77be104b1d
共有 3 个文件被更改,包括 7 次插入3 次删除
  1. +1
    -0
      router
  2. +4
    -1
      scripts/nspawn-support.sh
  3. +2
    -2
      scripts/run-tests.sh

+ 1
- 0
router 查看文件

@@ -1,5 +1,6 @@
#!/usr/bin/env racket
#lang racket
; vim:syntax=racket

(require "iputil.rkt")



+ 4
- 1
scripts/nspawn-support.sh 查看文件

@@ -4,7 +4,10 @@ cmd="$1"
dir="$2"

if [ "$cmd" == "create" ]; then
debootstrap --include=systemd-container --include=libpython3.6 --include=racket --components=main,universe bionic "$dir" http://archive.ubuntu.com/ubuntu/
debootstrap --include=systemd-container --include=racket --components=main,universe disco "$dir" http://archive.ubuntu.com/ubuntu/
systemd-nspawn -D "$dir" --bind "$PWD:/router" -- /bin/bash -c "cd /router && scripts/setup.sh"
elif [ "$cmd" == "boot" ]; then
systemd-nspawn -D "$dir" --bind "$PWD:/router" -- /bin/bash -c "cd /router && scripts/run-tests.sh /router/build"
elif [ "$cmd" == "test" ]; then
systemd-nspawn -D "$dir" --bind "$PWD:/router" -- /bin/bash -c "cd /router && bash"
fi

+ 2
- 2
scripts/run-tests.sh 查看文件

@@ -2,6 +2,6 @@

rm /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf
apt install libpython3.6
cd $1
./sim --router ../router milestone
export LD_LIBRARY_PATH=/usr/local/lib
/usr/local/bin/python3.6 sim --router ../router milestone

正在加载...
取消
保存