Docker思维导图
![]()
Docker
docker 中还是有部分思想和git有相似的地方
git --version docker --version docker info
git pull docker pull
git push -- docker push
git rm -- docker rmi docker rm
git diff -- docker diff
git commit -- docker commit
git log --docker logs
git tag -- docker tag
借鉴
01.Docker将镜像以代码仓库的形式进行版本管理,并支持通过Push/Pull的方式来发布和分发镜像,它为软件的交付提供了载体
镜像仓库提供了软件的版本管理和全球分发
02.docker commit
Git和Gitlab
workflows pipeline
第一阶段
其他的版本管理:usually--one step committing from the working copy to a shared server
Local repository --> Remote repository
Git的版本管理: git add --> git commit --> git push 三个步骤
Working copy --> Index --> Local repository --> Remote repository
第二阶段
branching model --面对多人的修改
Git-Flow a main branch
a separate develop branch, with supporting branches for features, releases, and hotfixes.
第三阶段-deployment
01. Merge/pull requests with GitLab flow
serves as a code review tool, and no separate code review tools should be needed
02.Issue tracking
容器
服务器等通用场景-系统容器
重计算、高性能、大并发的场景下,重型应用和业务云化的问题
端侧的嵌入式设备-轻量级容器
IoT、边缘计算产业
iSula容器--轻量级容器引擎(iSulad)服务端daemon为isulad
systemd管理iSulad进程,
修改 /etc/sysconfig/iSulad 文件中的OPTIONS字段
isulad配置文件为 /etc/isulad/daemon.json
docker默认为使用overlay2存储驱动
docker pull、docker build、docker commit、docker import、docker load都可以创建一个新的镜像
用镜像ID打包的话导致解压的出来的镜像没有名字
docker中批量删除 tag为none的镜像或名字是none
docker images|grep none|awk '{print $3}'|xargs docker rmi
Git
Git--本地和远程
本地--工作区 暂存区 仓库区
动作: 加入--提交-推送发布 撤销
分支策略
功能分支
位置分支
更新策略: merge 或者 rebase
合并或者变基
git fetch + git merge == git pull
git fetch + git rebase == git pull --rebase
git merge== 选择合并来保持分支同步
git rebase == 选择变基来保持分支同步
rebase的过程中,也许会出现冲突(conflict). 在这种情况,
Git会停止rebase并会让你去解决 冲突;在解决完冲突后,用"git-add"命令去更新这些内容的索引(index),
然后,你无需执行 git-commit,只要执行:
$ git rebase --continue 这样git会继续应用(apply)余下的补丁。
git rebase衍合能产生一个更为整洁的提交历史 patch
git log 查看有哪一些commit
解决冲突的方式
GitHub、Bitbucket 和码云(Gitee.com)选择 Pull Request 作为这项功能的名称
GitLab 和 Gitorious 选择 merge Request 作为这项功能的名称
GitLab 分为社区版(CE) 和企业版(EE)
参考
容器用户指南/Docker容器/命令行参考 https://docs.openeuler.org/zh/docs/20.03_LTS/docs/Container/%E5%AE%B9%E5%99%A8%E7%AE%A1%E7%90%86-4.html
https://docs.openeuler.org/zh/docs/20.03_LTS/docs/A-Tune/%E8%AE%A4%E8%AF%86A-Tune.html