Coder Social home page Coder Social logo

mydocker's Introduction

mydocker 是一个用go+cgo编写的容器,出于个人兴趣用来学习docker的原理。

本人编译及运行环境:

  • go 1.13
  • ubuntu 14.04/19.01
  • rootfs 放到 /root/rootfs/下面

rootfs 可以放到自己喜欢的路径下,确保代码中的path和此路径一致即可,每个发行版的rootfs也会有些许差异。

查看帮助:

go build -mod=vendor .
sudo ./mydocker -h

增加namespace,进行资源的隔离

增加cgroup,进行资源的限制(memory,cpu,cpuset)

增加aufs包装镜像

增加卷挂载支持

增加容器简单打包(commit)

增加容器后台运行(-d)

增加查看容器(ps)

增加进入容器(exec)

增加容器终止(stop)

增加删除容器(rm)

增加开始容器(start)

隐藏init命令(cobra->cli)

增加环境变量(-e)

mydocker's People

Contributors

caijinken avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.