# tiny4containerd
**Repository Path**: binave/tiny4containerd
## Basic Information
- **Project Name**: tiny4containerd
- **Description**: Tiny4Containerd is a lightweight Linux distribution made specifically to run containers on bare metal. It runs completely from RAM.
- **Primary Language**: Shell
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 12
- **Forks**: 1
- **Created**: 2020-09-09
- **Last Updated**: 2024-10-15
## Categories & Tags
**Categories**: containers
**Tags**: Linux, Docker, Bash
## README
# Tiny4Containerd
Tiny4Containerd is a lightweight Linux distribution made specifically to run containers on bare metal.
It runs completely from RAM.
Tiny4Containerd 是一个轻量级,运行于内存中的 linux,用于在裸机上快速部署容器环境。
---------
# Licensing
tiny4containerd is licensed under the Apache License, Version 2.0. See
[LICENSE](https://github.com/binave/tiny4containerd/blob/master/LICENSE) for the full
license text.
import:
* [kernel](https://www.kernel.org)
* [Tiny Core Linux](http://tinycorelinux.net)
* [Docker](https://www.docker.com/)
* [cgroupfs-mount](https://github.com/tianon/cgroupfs-mount)
* [boot2docker](https://github.com/boot2docker/boot2docker)
---------
If you want to SSH into the machine, the credentials are:
如果你需要通过 SSH 登陆设备,初始账号密码如下。
```
user: tc
pass: tcuser
```
---------
#### Install on any device
To 'install' the ISO onto an SD card, USB-Stick or even empty hard disk, you can
use `dd if=tiny4containerd.iso of=/dev/sdX`. This will create the small boot
partition, and install an MBR.
如果想要将 ISO 文件安装到 SD 卡或其他 USB 接口的空存储介质,可以
使用 `dd if=tiny4containerd.iso of=/dev/sdX` 命令。
If make sure the disk is empty for real, initialise to md array, create a logical volume, format it.
如果启动中检测到一个空硬盘,会自动初始化成 RAID,并在上面建立 LVM2 分区。
If there is a logical volume name `lv_data` and `lv_log`, mount it.
如果启动中检测到一个逻辑卷名为 `lv_data` 和 `lv_log`,会对其进行自动挂载。
卷标为 `lv_log` 的逻辑卷会挂载到 `/log` 目录上。
逻辑卷 `lv_data` 中的以下目录会被挂载到根目录上:
```
/home
/opt
/tmp
/volume1
```
如果没有相应目录,会自动建立并挂载。
注意:没有对 SSD (固态硬盘)进行特别处理。
相同型号 SSD 组成的 RAID ,可能出现寿命同时用尽的情况,会增加数据永久丢失的风险。
---------
# FAQ
### Q: 如何进行自定义配置
A:
> 卷标为 `lv_data` 的逻辑卷,存在多个配置文件
> 依执行顺序:
> |路径|说明|样例|备注
> |---|---|---|---
> |/opt/tiny/etc/passwd|密码配置|`root:$1$AgCGptrX$hL7QB536iJ9KKjO1KtfVA.`|使用 `openssl passwd -1 [password]` 生成加密密码
> |/opt/tiny/etc/if.cfg|静态 ip 配置|`eth0 192.168.1.123 192.168.1.255 255.255.255.0`|
> |/opt/tiny/etc/init.d/[SK]*.sh|启动、关机脚本|S01_ftpd.sh K20_ftpd.sh|`S*.sh` 在服务启动前执行
`K*.sh` 设备关机前执行
> |/opt/tiny/etc/env|环境变量配置|`EXTRA_ARGS="--registry-mirror=https://xxx.mirror.aliyuncs.com"`|
> |/opt/tiny/etc/rc.local|启动最后阶段执行||需要赋予可执行权限
> |isolinux.cfg|启动参数和环境变量配置||需要编辑源代码中的配置文件