博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
基于当前系统制作docker镜像
阅读量:4216 次
发布时间:2019-05-26

本文共 1564 字,大约阅读时间需要 5 分钟。

1:通过tar 备份目录tar -cvpf /home/buildrpm.tar --directory=/ --exclude=proc --exclude=sys --exclude=dev --exclude=run /[root@localhost home]# lsbuildrpm.tar2:导入镜像cat buildrpm.tar | docker import - buildrpm。如果提示Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?则先运行docker service[root@localhost home]# service docker start3:运行[root@localhost home]# docker imagesREPOSITORY          TAG                 IMAGE ID            CREATED             SIZEbuildrpm            latest              15adc9614eb8        17 seconds ago      1.14 GB[root@localhost home]# docker run -it buildrpm:latest /bin/bash4删除:[root@localhost home]# docker ps -aCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES920f5a69f58d        buildrpm:latest     "/bin/bash"         2 minutes ago       Exited (0) 2 minutes ago                       laughing_minsky[root@localhost home]# docker rm 920f5a69f58d920f5a69f58d[root@localhost home]# docker imagesREPOSITORY          TAG                 IMAGE ID            CREATED             SIZEbuildrpm            latest              15adc9614eb8        4 minutes ago       1.14 GB[root@localhost home]# docker rmi 15adc9614eb8Untagged: buildrpm:latestDeleted: sha256:15adc9614eb815974edfaca89671f86ea61e46929792c42f7515dfd65ff24688Deleted: sha256:aed61d9930e43fbf0c5d3a771b9dde602b0dda2fec6066a166d2ba9180402880[root@localhost home]# docker imagesREPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

 

转载地址:http://nsnmi.baihongyu.com/

你可能感兴趣的文章
CentOS中环境变量和配置文件
查看>>
开源大数据平台如何才能保证身份认证安全?Kerberos
查看>>
kerberos认证原理---讲的非常细致,易懂
查看>>
【大数据安全】基于Kerberos的大数据安全验证方案
查看>>
数据治理 - 数据仓库历史数据存储 - 拉链表
查看>>
数据治理 - 漫谈数据仓库之维度建模
查看>>
mark : JVM性能调优之生成堆的dump文件
查看>>
并发编程中的协程
查看>>
Spring Security
查看>>
Spring Security
查看>>
Mark : Hadoop源码解析之: TextInputFormat如何处理跨split的行
查看>>
Mark : Spark文章 收录
查看>>
Mark : Scala 文章收录
查看>>
Mark : 【Scala】使用Option、Some、None,避免使用null
查看>>
Mark : BlockingQueue在任务调度中的精彩应用
查看>>
Mark :BlockingQueue
查看>>
编程思想 - OpenHashMap 为什么比hashmap 快
查看>>
IPFS
查看>>
EOS 搭建本地运行环境
查看>>
待续 总结 - parquet 与 avro
查看>>