Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add platform linux/amd64 for the goreleaser docker image #140

Merged
merged 2 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ dockers:
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/LinuxSuRen/http-downloader"
- "--platform=linux/arm64"
- "--platform=linux/amd64"
12 changes: 12 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,15 @@ hd get --pre ks
* 多线程
* 断点续传 (TODO)
* 对 GitHub release 文件下载(安装)友好

## 使用多阶段构建
你想要在 Docker 构建中下载工具吗?这个很容易的,请查看下面的例子:

```dockerfile
FROM ghcr.io/linuxsuren/hd:v0.0.40 as downloader
RUN hd install kubesphere-sigs/[email protected]

FROM alpine:3.10
COPY --from=downloader /usr/local/bin/ks /usr/local/bin/ks
CMD ["ks"]
```
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ When you first run it, please init via: `hd fetch`

then you can search it by a keyword: `hd search jenkins`

## Use multi-stage builds
Do you want to download tools in the Docker builds? It's pretty easy. Please see the following example:

```dockerfile
FROM ghcr.io/linuxsuren/hd:v0.0.40 as downloader
RUN hd install kubesphere-sigs/[email protected]

FROM alpine:3.10
COPY --from=downloader /usr/local/bin/ks /usr/local/bin/ks
CMD ["ks"]
```

## As a library
You can import it from `github.com/linuxsuren/http-downloader/pkg/installer`, then put the following code to your CLI.
It can help you to download desired tools:
Expand Down