Skip to content

Commit

Permalink
feature(main): add readme
Browse files Browse the repository at this point in the history
Signed-off-by: cuisongliu <[email protected]>
  • Loading branch information
cuisongliu committed Aug 19, 2023
1 parent 1e35ea2 commit 1c76bb4
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 1 deletion.
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
# sreg
# sreg - Sealos Registry Tool

sreg is a tool focused on managing Sealos registry. Its goal is to provide a solution that doesn't rely on buildah, allowing for more flexible image management and support for Sealos deployments.

## Installation

You can install sreg by following these steps:

1. Download the latest version of the sreg release package for your operating system: [sreg](https://github.com/labring/sreg/releases)

2. Extract the downloaded release package:
```sh
tar -xzf sreg_0.1.1_linux_amd64.tar.gz
```

3. Move the extracted executable to your PATH for global access:
```sh
sudo mv sreg /usr/local/bin/
```

## Usage

### Save an Image to a Local File
```sh
sreg save --registry-dir=/tmp/registry1 my-context
```

### Start a Filesystem Image Repository Service
```sh
sreg serve filesystem --port=5000
```

### Start an In-Memory Image Repository Service
```sh
sreg serve inmem --port=5000
```

### Sync an Image to a Different Repository
```sh
sreg sync source-image dst
```

### Copy an Image to a Different Repository
```sh
sreg copy source-image dst
```

## Building Your Own Version

If you wish to build your own version of sreg, you can use [goreleaser](https://goreleaser.com/) for building. Use the following command to build:

```sh
goreleaser build --snapshot --timeout=1h --rm-dist
```

## Why Choose sreg?

sreg's development aims to meet the need for image repository management in Sealos deployments without relying on buildah. It offers a more flexible and secure image management approach. Whether you require stricter image security or more controlled image distribution, sreg is an ideal choice.
58 changes: 58 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# sreg - Sealos 镜像仓库工具

sreg 是一个专注于 Sealos 镜像仓库管理的工具,它的目标是提供一个不依赖于 buildah 的解决方案,以便更灵活地管理镜像,并为 Sealos 部署提供支持。

## 安装

您可以通过以下步骤来安装 sreg:

1. 下载适用于您的操作系统的最新版本 sreg 发布包:[sreg](https://github.com/labring/sreg/releases)

2. 解压下载的发布包:
```sh
tar -xzf sreg_0.1.1_linux_amd64.tar.gz
```

3. 将解压后的可执行文件移动到您的 PATH 中,以使其可以全局访问:
```sh
sudo mv sreg /usr/local/bin/
```

## 使用方法

### 保存镜像到本地文件
```sh
sreg save --registry-dir=/tmp/registry1 my-context
```

### 启动文件系统镜像仓库服务
```sh
sreg serve filesystem --port=5000
```

### 启动内存中的镜像仓库服务
```sh
sreg serve inmem --port=5000
```

### 同步镜像到不同仓库
```sh
sreg sync source-image dst
```

### 复制镜像到不同仓库
```sh
sreg copy source-image dst
```

## 构建自己的版本

如果您希望构建自己的 sreg 版本,您可以使用 [goreleaser](https://goreleaser.com/) 进行构建。使用以下命令进行构建:

```sh
goreleaser build --snapshot --timeout=1h --rm-dist
```

## 为什么选择 sreg?

sreg 的开发旨在满足在 Sealos 部署中无需依赖 buildah 的镜像仓库需求,提供了更灵活和安全的镜像管理方式。无论您需要更严格的镜像安全性还是更受控的镜像分发,sreg 都是理想的选择。

0 comments on commit 1c76bb4

Please sign in to comment.