Giter Club home page Giter Club logo

docker.sh's Introduction

About

docker.sh 是用 Shell 写的一个简易的 docker,支持以下功能:

  • uts namespace
  • mount namespace
  • pid namespace
  • network namespace
  • memory 资源限制
  • 联合加载
  • 卷目录

关于 docker.sh 的详细讲解,请阅读微信公众号 ScratchLab 文章《使用 Shell 脚本实现 Docker》、《使用 Shell 脚本实现 Docker(二)》:

微信搜一搜 ScratchLab

《使用 Shell 脚本实现 Docker》讲解了以下功能:

  • uts namespace
  • mount namespace
  • pid namespace
  • network namespace
  • memory 资源限制
  • 联合加载
  • 卷目录

《使用 Shell 脚本实现 Docker》讲解了以下功能:

  • network namespace
  • iptables

docker.sh 有两个分支,默认分支为 v1 分支,该分支适用于《使用 Shell 脚本实现 Docker》。v2 分支适用于《使用 Shell 脚本实现 Docker(二)》。切换分支的命令如下:

git checkout v1
git checkout v2

Run

# 制作镜像
mkdir images
cd images
sudo debootstrap --arch amd64 xenial ./ubuntu1604

# 运行容器
sudo ./docker.sh -c run -m 100M -C dreamland -I ubuntu1604 -V data1 -P /bin/bash -n host -n none

docker.sh's People

Contributors

pandengyang avatar

Stargazers

 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.