ydocker

command module
v0.0.0-...-504d40a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2020 License: MIT Imports: 4 Imported by: 0

README

ydocker

《自己动手写Docker》实践与总结,针对代码功能与结构进行调整与优化,同时添加相应的注释与测试代码。

使用

构建
$ go build
运行
$ ./ydocker run -ti busybox sh
$ ./ydocker network create --subnet 10.0.1.0/24 --driver bridge test_bridge
$ ./ydocker network list
$ ./ydocker network remove test_bridge
$ ./ydocker run -ti -p 8080:8080 -net test_bridge --name demo busybox top
$ ./ydocker stop demo
$ ./ydocker rm demo
测试
$ sh run_test.sh
$ sh run_test_network.sh

TODO

  • volume 参数支持多个
  • 支持自定义运行路径(当前为/root
  • 数据文件存取加锁
  • 清理 iptables 中的 portMapping 配置
  • 检测已经存在的 port 冲突
  • 实现 image 相关功能

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
demo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL