docker_practice/coreos/install.md
Kang HuaiShuai 5577c9caa6
Change CoreOS to Fedora CoreOS(FCOS)
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-22 13:55:13 +08:00

47 lines
864 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 安装 Fedora CoreOS
## 下载 ISO
[下载页面](https://getfedora.org/coreos/download/) `Bare Metal & Virtualized` 标签页下载 ISO。
## 编写 FCC
FCC Fedora CoreOS Configuration Fedora CoreOS 配置的简称
```yaml
# example.fcc
variant: fcos
version: 1.0.0
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-rsa AAAA...
```
`ssh-rsa AAAA...` 替换为自己的 SSH 公钥位于 `~/.ssh/id_rsa.pub`
## 转换 FCC Ignition
```bash
$ docker run -i --rm quay.io/coreos/fcct:v0.2.0 -pretty -strict < example.fcc > example.ign
```
## 启动虚拟机并安装
在虚拟机终端执行以下命令安装
```bash
$ sudo coreos-installer install /dev/sda --ignition example.ign
```
安装之后重新启动即可使用
## 使用
```bash
$ ssh core@虚拟机IP
$ docker --version
```