mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-25 03:05:32 +00:00
Add blank lines before headers
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
FCC 是 Fedora CoreOS Configuration (Fedora CoreOS 配置) 的简称。
|
||||
|
||||
```yaml
|
||||
|
||||
## example.fcc
|
||||
|
||||
variant: fcos
|
||||
|
||||
@@ -40,6 +40,7 @@ $ podman machine start
|
||||
#### 运行容器
|
||||
|
||||
```bash
|
||||
|
||||
## $ docker run -d -p 80:80 nginx:alpine
|
||||
|
||||
$ podman run -d -p 80:80 nginx:alpine
|
||||
@@ -62,6 +63,7 @@ $ podman build -t myimage .
|
||||
与 Docker 不同,Podman 支持“Pod”的概念 (类似于 Kubernetes 的 Pod),允许你在同一个网络命名空间中运行多个容器。
|
||||
|
||||
```bash
|
||||
|
||||
## 创建一个 Pod
|
||||
|
||||
$ podman pod create --name mypod -p 8080:80
|
||||
@@ -84,6 +86,7 @@ $ alias docker=podman
|
||||
Podman 可以生成 systemd 单元文件,让容器像普通系统服务一样管理。
|
||||
|
||||
```bash
|
||||
|
||||
## 创建容器
|
||||
|
||||
$ podman run -d --name myweb -p 8080:80 nginx
|
||||
|
||||
@@ -49,6 +49,7 @@ $ buildah bud -t my-app:latest .
|
||||
除了使用 Dockerfile,Buildah 最强大的功能来自于它的交互式和脚本化构建机制。我们可以从一个极简的镜像(或基础镜像)开始构建:
|
||||
|
||||
```bash
|
||||
|
||||
# 获取一个基础镜像
|
||||
$ container=$(buildah from alpine:latest)
|
||||
|
||||
@@ -78,6 +79,7 @@ $ buildah rm $container
|
||||
通过 `buildah images` 可以查看当前环境中的镜像。推送镜像到外部 Registry 也十分安全方便:
|
||||
|
||||
```bash
|
||||
|
||||
# 查看本地构建的镜像
|
||||
$ buildah images
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ Kubernetes 作为一个容器编排系统,为了屏蔽底层不同容器运行
|
||||
安装完 containerd 和 nerdctl 后,你可以体验到几乎与 Docker 完全一致的命令行:
|
||||
|
||||
```bash
|
||||
|
||||
# 启动一个 nginx 容器
|
||||
$ nerdctl run -d -p 8080:80 --name my-nginx nginx:alpine
|
||||
|
||||
|
||||
Reference in New Issue
Block a user