add docker

This commit is contained in:
syui 2024-02-08 19:04:45 +09:00
parent 225d7af6a8
commit b921da4529
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
7 changed files with 81 additions and 1 deletions

View File

@ -1,7 +1,59 @@
## ai `os`
<img src="./icon/ai.png" width="100">
- name : ai os
- base : [archlinux](https://gitlab.archlinux.org/archlinux)
- base : [archlinux](https://gitlab.archlinux.org/archlinux/archlinux-docker)
```sh
$ pacman -S archiso
```
```sh
$ git clone https://git.syui.ai/ai/os
$ cd os
$ git clone https://gitlab.archlinux.org/archlinux/archlinux-docker
$ git clone https://gitlab.archlinux.org/archlinux/archiso
$ cp ./profiledef.sh ./archiso/configs/releng/profiledef.sh
$ mkarchiso -v -o ./ ./archiso/configs/releng
```
- [profile.rst](https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/docs/README.profile.rst)
### docker
```sh
$ docker pull syui/aios
```
```sh
$ docker run --rm syui/aios ai ai -t os
```
> archiso/configs/releng/profiledef.sh
```sh
buildmodes=('bootstrap')
```
```sh
$ mkarchiso -v -o ./ ./archiso/configs/releng
$ tar xf aios-bootstrap*.tar.gz
$ echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch\nServer = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
$ sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
$ arch-chroot ./root.86_64
---
$ pacman -S base base-devel linux vim git zsh rust
$ pacman-key --init
$ pacman-key --populate archlinux
$ exit
---
$ tar -C root.86_64 -c . | docker import - aios
$ docker images
$ docker run --rm aios cargo version
cargo 1.75.0
```

1
archiso Submodule

@ -0,0 +1 @@
Subproject commit 1f65b695d309d6089bdc2251bb4c9aa00bd11a51

1
archlinux-docker Submodule

@ -0,0 +1 @@
Subproject commit 98cd79111dd530447f491d547d14f3c38e227e46

BIN
icon/ai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
icon/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 KiB

BIN
icon/wall.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

26
profiledef.sh Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
# shellcheck disable=SC2034
iso_name="aios"
iso_label="AI_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
iso_publisher="ai os <https://git.syui.ai/ai/os>"
iso_application="ai os Live/Rescue DVD"
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
install_dir="ai"
buildmodes=('iso')
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
'uefi-ia32.grub.esp' 'uefi-x64.grub.esp'
'uefi-ia32.grub.eltorito' 'uefi-x64.grub.eltorito')
arch="x86_64"
pacman_conf="pacman.conf"
airootfs_image_type="squashfs"
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
file_permissions=(
["/etc/shadow"]="0:0:400"
["/root"]="0:0:750"
["/root/.automated_script.sh"]="0:0:755"
["/root/.gnupg"]="0:0:700"
["/usr/local/bin/choose-mirror"]="0:0:755"
["/usr/local/bin/Installation_guide"]="0:0:755"
["/usr/local/bin/livecd-sound"]="0:0:755"
)