【文件属性】:
文件名称:docker-static-ip:容器静态IP地址
文件大小:2KB
文件格式:ZIP
更新时间:2021-05-09 16:46:43
Python
环保
大家好。 该脚本可以配置容器的ip地址持久性。 使用前确认:
pip安装docker-py
百胜安装bridge-utils -y
##演示
cd docker-static-ip
python duration.py
运行测试容器
[root@image docker-static-ip]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos6 base 4fbd1376f4f6 4 weeks ago 311.3 MB
[root@image docker-static-ip]# docker run -d --net
【文件预览】:
docker-static-ip-master
----containers.cfg(60B)
----README.md(3KB)
----duration.py(2KB)