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
系统推荐
- 记一次内存泄漏
- Btrace入门
- Git合并多个提交并push到远程仓库
- Censys搜索引擎学习
- PGSQL GIN索引“失效”
- 批量修改git历史记录中的用户名和邮箱
- 多台centos服务器,文件互相备份
- 分布式事务Seata
- Docker隐射的端口外网不能访问
- https和http混用解决办法
- Linux dev shm目录
- Hbase 总览
- 随机毒鸡汤:心脏病发作起来,可能连送去ICU,参加复活赛的时间都不给。