Docker笔记
大约 2 分钟
镜像与容器 === 类与对象
安装
yum install -y docker
----
启动
systemctl start docker.service
或者
service docker start
----
设置自启动
systemctl enable docker.service
----
创建自己的镜像
Dockerfile:
FROM sebp/elk
MAINTAINER rocky "rocky.peng@qq.com"
RUN apt-get update
RUN apt-get install htop
RUN apt-get update && apt-get install git --assume-yes
RUN apt-get install zsh --assume-yes
RUN sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
在dockerfile所在的目录执行:
docker build -t pqs/elk .
-t : 指定镜像id和tag
. 表示dockerfile所在的目录
导入导出镜像
导出
docker save imageid -o 导出的文件名.tar
导入
docker load -i xxx.tar
系统推荐
- MySQL杂项
- ES6.2.3(3节点)数据迁移到ES7.4.1(5节点)
- JetBrains IDE 全破解
- Spring Cloud(一):服务治理技术概览【Finchley 版】
- 手把手教你制作Cookie、Local、Session数据导出插件
- 弱引用示例
- 如何安装Google BBR
- IO相关
- Arthas使用记录
- CountDownLatch源码解读
- 杂记
- BBR加速
- 随机毒鸡汤:用钱当然买不到快乐,只是有钱,别人会想办法让你快乐。