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
系统推荐
- Notion笔记定时备份
- MAT工具
- RSA 加密解密多语言实现方案
- 免费https证书、自动续期
- 记一次内存泄漏
- MySQL常用命令
- Nacos-Spring Gateway-Spring boot无感发布
- HTTP1 0 vs HTTP1 1 vs WebSocket
- 搭建基于docker的elk平台来分析java日志
- Git历史记录修改用户名和邮箱
- Nginx的双向认证配置
- 分布式问题
- 随机毒鸡汤:不是你喜欢的人不喜欢你,而是你,偏要喜欢不喜欢你的人。