Skip to content

Commit ef562db

Browse files
committed
v0.9.0 release
1 parent 16871f2 commit ef562db

File tree

4 files changed

+138
-70
lines changed

4 files changed

+138
-70
lines changed

README.md

Lines changed: 9 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
[![Build release](https://github.com/RuriOSS/rurima/actions/workflows/build.yml/badge.svg)](https://github.com/RuriOSS/rurima/actions/workflows/build.yml)
66

77
![](https://img.shields.io/badge/Powered%20By-GNU%20C-00d000?style=flat&labelColor=gray&logo=C)
8-
8+
# The first release:
9+
v0.9.0 is the first release of rurima, some feature are still WIP, but it is already usable as the extended version of ruri.
910
# About:
1011
So, what is rurima?
1112
The enhanced version of ruri.
1213
ruri only focus on running container, but rurima can also provide the function of getting rootfs image and backup/restore.
1314
And it will be a more powerful container manager in the fulture.
1415
With the `docker` and `lxc` subcommand of rurima, you can search & get & unpack images from dockerhub or LXC mirror easily.
15-
# Not Only Ruri Container Manager:
16+
## Not Only Ruri Container Manager:
1617
Rurima was planned to be the ruri container manager, but as rurima has a full integration of ruri now, you can just use it as a more powerful version of ruri, although the container manager function is still WIP.
1718
For more info about ruri, see [ruri](https://github.com/Moe-hacker/ruri)
18-
# Note & WIP:
19+
## Note & WIP:
1920
This project does not follow OCI and can only be a `PARTIAL` replacement of docker, this project is still under development.
20-
# Terms of Use:
21+
## Terms of Use:
2122
See [TERMS_OF_USE.md](TERMS_OF_USE.md)
22-
# For Android user:
23+
## For Android user:
2324
You might need to root your phone before using rurima, some container might not work properly with proot.
24-
25-
# What's new:
26-
You can use `rurima ota` to update rurima automatically now.
27-
And, we are working for the migration from daijin, so rurima will fully replace it in the future.
25+
# Full usage doc:
26+
For a full usage documentation,
27+
See [USAGE.md](doc/USAGE.md)
2828
# WARNING:
2929
```
3030
* Your warranty is void.
@@ -53,48 +53,6 @@ rurima pull whyour/qinglong ./test
5353
rurima pull ubuntu ./test
5454
```
5555
It will search lxc image first, if not found, it will auto try to pull rootfs from dockerhub.
56-
# Example usage of docker subcommand:
57-
Get `alpine` image, use tag `edge`, save to `./test`
58-
```sh
59-
rurima docker pull -i alpine -t edge -s ./test
60-
```
61-
Get `whyour/qinglong` docker image.
62-
```sh
63-
rurima docker pull -i whyour/qinglong -s ./test
64-
```
65-
Get `ubuntu` docker image.
66-
```sh
67-
rurima docker pull -i ubuntu -s ./test
68-
```
69-
Search for image `ubuntu`:
70-
```sh
71-
rurima docker search -i ubuntu
72-
```
73-
Search tag for `ubuntu`:
74-
```sh
75-
rurima docker tag -i ubuntu
76-
```
77-
Use docker mirror `dockerpull.org`
78-
```sh
79-
rurima docker pull -m dockerpull.org -i ubuntu -s ./test
80-
```
81-
Try every mirrorlist:
82-
```sh
83-
rurima docker pull -T -i ubuntu -s ./test
84-
```
85-
Try fallback mode:
86-
```sh
87-
rurima docker pull -T -f -i ubuntu -s ./test
88-
```
89-
# Example usage of lxc subcommand:
90-
Pull `alpine` version `edge`.
91-
```sh
92-
rurima lxc pull -o alpine -v edge -s ./test
93-
```
94-
Use `mirrors.bfsu.edu.cn/lxc-images` as mirror:
95-
```sh
96-
rurima lxc pull -m mirrors.bfsu.edu.cn/lxc-images -o alpine -v edge -s ./test
97-
```
9856
# About suid or caps:
9957
Rurima does not allow to set any suid/sgid (with root) or capability on it, it will check it in main() and error() if detected these unsafe settings.
10058
So, please always use sudo instead.
@@ -130,20 +88,6 @@ and finally, tar -xvf *.apk to unpack it. So you got proot.static, rename it to
13088
Manage ruri containers and configs.
13189
Config support, a bit like Dockerfile.
13290
....
133-
# Usage:
134-
```
135-
Usage: rurima [subcommand] [options]
136-
Subcommands:
137-
docker: DockerHub support.
138-
lxc: LXC mirror support.
139-
pull: Pull rootfs.
140-
unpack: Unpack rootfs.
141-
backup: Backup rootfs.
142-
ruri: Built-in ruri command.
143-
help: Show help message.
144-
Options:
145-
-h, --help: Show help message.
146-
```
14791
---------
14892

14993
<p align="center">「僕らタイムフライヤー</p>

doc/USAGE.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Warning:
2+
Since rurima has not released v1.0, some usage/features may change in the future.
3+
# Undocumented part:
4+
The `run` and `netns` subcommand is WIP, it should not be used by users.
5+
# Image source:
6+
rurima currently supports both lxc-mirror and dockerhub as container image source.
7+
# Unified image puller:
8+
rurima has a unified `pull` subcommand that can pull images easily.
9+
## Basic usage:
10+
```sh
11+
# pull alpine:edge to ./test:
12+
rurima pull alpine:edge ./test
13+
# pull hello-world to ./hello:
14+
rurima pull hello-world ./hello
15+
```
16+
it's a bit like cmdline of docker, but, it will try lxc-mirror first if it found that the image is available there.
17+
## Full options:
18+
```
19+
Usage: rurima pull <options> [image]:[version] [savedir]
20+
Options:
21+
-h, --help: Show help message.
22+
-m, --mirror: Mirror URL.
23+
-a, --arch: Architecture.
24+
-d, --docker: Only search dockerhub for image.
25+
-f, --fallback: Fallback mode, only for docker image.
26+
```
27+
All options should be used when you really need.
28+
## Examples:
29+
```sh
30+
# pull alpine:edge to ./test, but using dockerhub as source:
31+
rurima pull --docker alpine:edge ./test
32+
33+
# pull hello-world to ./hello, but pull amd64 with fallback mode:
34+
rurima pull --arch amd64 --fallback hello-world ./hello
35+
36+
# pull alpine:edge to ./test from bfsu lxc mirror:
37+
rurima pull --mirror mirrors.bfsu.edu.cn/lxc-images alpine:edge ./test
38+
```
39+
# Utility commands:
40+
## Backup and restore
41+
```sh
42+
# backup container at ./alpine to ./alpine.tar:
43+
rurima backup -d ./alpine -f ./alpine.tar
44+
45+
# restore alpine.tar to ./alpine:
46+
rurima restore -f ./alpine.tar -d ./alpine
47+
```
48+
## Other utility commands:
49+
```sh
50+
# update rurima:
51+
rurima ota
52+
53+
# check for dependencies:
54+
rurima dep
55+
```
56+
# Call built-in ruri:
57+
ruri is a lightweight container runtime, it can be called directly by:
58+
```sh
59+
# Show ruri version info
60+
rurima r -v
61+
62+
# Run container at ./alpine:
63+
rurima r ./alpine
64+
```
65+
# docker subcommand:
66+
The docker subcommand is an unofficial tool to get docker image from dockerhub.
67+
## Full usage:
68+
```
69+
Usage: rurima docker [subcommand] [options]
70+
Subcommands:
71+
search: Search images from DockerHub.
72+
tag: Search tags from DockerHub.
73+
pull: Pull image from DockerHub.
74+
config: Get config of image from DockerHub.
75+
arch: Search architecture of image from DockerHub.
76+
help: Show help message.
77+
Options:
78+
-i, --image: Image name.
79+
-t, --tag: Tag of image.
80+
-a, --arch: Architecture of image.
81+
-s, --savedir: Save directory of image.
82+
-p, --page_size: Page size of search.
83+
-m, --mirror: Mirror of DockerHub.
84+
-r, --runtime: runtime of container, support [ruri/proot/chroot].
85+
-q, --quiet: Quiet mode.
86+
-f, --fallback: Fallback mode.
87+
-T, --try-mirrors <mirror>: Try mirrors.
88+
-S, --start-at [num]: Start pulling layer at [num] when pulling image.
89+
-n, --no-progress: Do not show progress.
90+
91+
Note: please remove `https://` prefix from mirror url.
92+
For example: `-m registry-1.docker.io`
93+
You can add your perfered mirrors for `-T` option to try them first, for example: `-T hub.xdark.top -T dockerpull.org`
94+
```
95+
## Note:
96+
`-i` and `-t` is required options for `config` and `pull` subcommand.
97+
`-i` is also used for `search` subcommand for image name.
98+
# lxc subcommand:
99+
# Full usage:
100+
```
101+
Usage: rurima lxc [subcommand] [options]
102+
Subcommands:
103+
pull: Pull image from LXC image server.
104+
list: List images from LXC image server.
105+
search: Search images from LXC image server.
106+
arch: Search architecture of images from LXC image server.
107+
help: Show help message.
108+
Options:
109+
-m, --mirror: Mirror of LXC image server.
110+
-o, --os: OS of image.
111+
-v, --version: Version of image.
112+
-a, --arch: Architecture of image.
113+
-t, --type: Type of image.
114+
-s, --savedir: Save directory of image.
115+
-n, --no-progress: Do not show progress.
116+
117+
Note: please remove `https://` prefix from mirror url.
118+
For example: `-m images.linuxcontainers.org`
119+
```
120+
# Note:
121+
`-o`, `-s` and `-v` is required options for `pull` subcommand.

src/include/version.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@
2929
*
3030
*/
3131
// Version info.
32-
#define RURIMA_VERSION "0.1-unreleased"
32+
#define RURIMA_VERSION "0.9"
33+
#define RURIMA_VERSION_MAJOR 0
34+
#define RURIMA_VERSION_MINOR 9
35+
#define RURIMA_VERSION_PATCH 0
3336
#include "../ruri/src/include/version.h"

src/info.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ void rurima_show_version_info(void)
4343
cprintf("{base} ● ● ●●● ● ● ●●● ● ● ● ●\n");
4444
cprintf("{base} Licensed under the MIT License\n");
4545
cprintf("{base} <https://mit-license.org>\n");
46-
cprintf("{base} Copyright (C) 2024 Moe-hacker\n\n");
47-
cprintf("{base}%s%s%s", "rurima version ..................: ", RURIMA_VERSION, "\n");
46+
cprintf("{base} Copyright (C) 2024-2025 Moe-hacker\n\n");
47+
cprintf("{base}%s%d.%d.%d%s", "rurima version ..................: ", RURIMA_VERSION_MAJOR, RURIMA_VERSION_MINOR, RURIMA_VERSION_PATCH, "\n");
4848
#if defined(RURIMA_COMMIT_ID)
4949
cprintf("{base}%s%s%s", "rurima commit id ................: ", RURIMA_COMMIT_ID, "\n");
5050
#endif
@@ -71,8 +71,8 @@ void rurima_show_version_code(void)
7171
* Maybe it can be useful one day...
7272
*/
7373
#ifdef RURIMA_OFFICIAL_BUILD
74-
cprintf("%s-official\n", RURIMA_VERSION);
74+
cprintf("%d.%d.%d-official\n", RURIMA_VERSION_MAJOR, RURIMA_VERSION_MINOR, RURIMA_VERSION_PATCH);
7575
#else
76-
cprintf("%s\n", RURIMA_VERSION);
76+
cprintf("%d.%d.%d\n", RURIMA_VERSION_MAJOR, RURIMA_VERSION_MINOR, RURIMA_VERSION_PATCH);
7777
#endif
7878
}

0 commit comments

Comments
 (0)