Skip to content

Commit

Permalink
add doc about docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed Jul 11, 2024
1 parent 0b52602 commit 71e1c01
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ It is recommended to build packages yourself if you want to install them in a pr
For testing purpose, we have built and uploaded some packages to
[cloudsmith](https://cloudsmith.io/~g3-oqh/repos/), you can find installation instructions there.

### Build Docker Image

You can find Dockerfile(s) under *docker* folder of each component. The build command will be like

```shell
# run this in the source root dir
docker build -f <component>/docker/debian.Dockerfile . -t <component>:<tag>
# build without the source code
docker build -f <component>/docker/debian.Dockerfile github.com/bytedance/g3 -t <component>:<tag>
# if you have a source tarball, you can also use the URL of that tarball
```

### Static Linking

See [Static Linking](doc/static-linking.md).
Expand Down
12 changes: 12 additions & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@ Cloudflare Keyless Server的简单实现。
测试环境的话,部分包已经编译上传到
[cloudsmith](https://cloudsmith.io/~g3-oqh/repos/), 可参考该链接页面的说明进行安装。

### 制作Docker镜像

每个组件的*docker*文件夹下有可参考的Dockerfile(s),命令如下:

```shell
# 在源码根目录可执行
docker build -f <component>/docker/debian.Dockerfile . -t <component>:<tag>
# 本地没有源码时,可用远程URL执行
docker build -f <component>/docker/debian.Dockerfile github.com/bytedance/g3 -t <component>:<tag>
# 如果已经制作了源码tar包,也可以把URL路径换成源码tar包路径
```

### 静态链接

参考 [Static Linking](doc/static-linking.md)。
Expand Down

0 comments on commit 71e1c01

Please sign in to comment.