实现自己的容器引擎(参考 自己动手写docker ) AUFS改为OVERLAY2联合文件系统实现 功能模块实现参照各个分支
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build .
[root@yangzhou010010001015 srv]# ./go_docker run -it /bin/sh
{"level":"info","msg":"init come on","time":"2020-05-05T17:32:48+08:00"}
{"level":"info","msg":"command /bin/sh","time":"2020-05-05T17:32:48+08:00"}
{"level":"info","msg":"command /bin/sh","time":"2020-05-05T17:32:48+08:00"}
sh-4.2# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 17:32 pts/8 00:00:00 /bin/sh
root 6 1 0 17:32 pts/8 00:00:00 ps -ef
[root@YZ01-Prometheus-Grafana1-19 tmp]# ./go_docker run -it sh
{"level":"info","msg":"command all is sh","time":"2020-05-07T17:42:29+08:00"}
{"level":"info","msg":"init come on","time":"2020-05-07T17:42:29+08:00"}
{"level":"info","msg":"find path /usr/bin/sh","time":"2020-05-07T17:42:29+08:00"}
sh-4.2# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 17:42 pts/1 00:00:00 sh
root 6 1 0 17:42 pts/1 00:00:00 ps -ef