|
| 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. |
0 commit comments