V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
herozem
V2EX  ›  分享创造

写了个容器的小 demo

  •  
  •   herozem · 2018-03-09 10:21:30 +08:00 · 3277 次点击
    这是一个创建于 2211 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://github.com/jiajunhuang/cup

    容器的原理原来 so easy,不过 Docker 这么火,估计是做了大量的包装,让容器技术简易上手吧

    11 条回复    2018-03-09 16:44:55 +08:00
    FEDT
        1
    FEDT  
       2018-03-09 10:29:29 +08:00 via iPhone
    膜拜
    archknight
        2
    archknight  
       2018-03-09 11:08:48 +08:00
    dalao 真的强
    Icezers
        3
    Icezers  
       2018-03-09 11:19:15 +08:00 via iPhone
    Mark
    kofj
        4
    kofj  
       2018-03-09 14:48:56 +08:00
    failed to run command: fork/exec /proc/self/exe: invalid argument
    Linux 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    herozem
        5
    herozem  
    OP
       2018-03-09 14:58:03 +08:00
    @kofj 你这个内核好像有点老,`/proc/self/exe` 我不记得在哪个版本引入的来着,换个新点的内核
    tangwz
        6
    tangwz  
       2018-03-09 15:02:59 +08:00
    厉害了。另,还有 shell 实现的 docker: https://github.com/p8952/bocker
    kofj
        7
    kofj  
       2018-03-09 15:07:56 +08:00
    有 /proc/self/exe,这台机器还有跑 docker
    $ ls -al /proc/self/exe
    lrwxrwxrwx. 1 root root 0 3 月 9 15:07 /proc/self/exe -> /usr/bin/ls
    herozem
        8
    herozem  
    OP
       2018-03-09 15:16:23 +08:00
    @kofj 可以贴一下你执行命令的历史记录么?另外 uname -a 和 lsb_release -a 也贴一下
    herozem
        9
    herozem  
    OP
       2018-03-09 15:16:59 +08:00
    @tangwz 哇,这个是真厉害
    kofj
        10
    kofj  
       2018-03-09 15:26:31 +08:00
    uname -a 贴过了
    $lsb_release -a
    LSB Version: :core-4.1-amd64:core-4.1-noarch
    Distributor ID: CentOS
    Description: CentOS Linux release 7.1.1503 (Core)
    Release: 7.1.1503
    deadEgg
        11
    deadEgg  
       2018-03-09 16:44:55 +08:00
    cup。。

    让我想起了一个古老的项目: http://www2.cs.tum.edu/projects/cup/
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   942 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 20:50 · PVG 04:50 · LAX 13:50 · JFK 16:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.