gvisor

The Redefine Team Lv5

clone code

1
git clone --recursive git@github.com:google/gvisor.git 

build && install

1
2
3
4
5
6
7
8
9
10
cd gvisor 

bazel build runsc

ERROR: ~/gvisor/runsc/cmd/BUILD:5:1: no such package '@org_golang_x_sys//unix': failed to fetch org_golang_x_sys: 2018/05/02 20:23:13 unrecognized import path "golang.org/x/sys"
and referenced by '//runsc/cmd:cmd'
ERROR: Analysis of target '//runsc:runsc' failed; build aborted: no such package '@org_golang_x_sys//unix': failed to fetch org_golang_x_sys: 2018/05/02 20:23:13 unrecognized import path "golang.org/x/sys"
INFO: Elapsed time: 60.769s
FAILED: Build did NOT complete successfully (3 packages loaded)

change docker daemon.json

1
2
3
4
5
6
7
8
9
10
11
edit /etc/docker/daemon.json
cat
{
"runtimes": {
"runsc": {
"path": "/usr/local/bin/runsc"
}
}
}
>> /etc/docker/daemon.json

test runsc

1
2
systemctl restart docker 
docker run --runtime=runsc hello-world
  • 标题: gvisor
  • 作者: The Redefine Team
  • 创建于 : 2018-05-02 20:14:26
  • 更新于 : 2023-05-23 18:52:03
  • 链接: https://redefine.ohevan.com/2018/05/02/gvisor/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论