Skip to content

Commit 37719ad

Browse files
authored
Add platform linux/amd64 for the goreleaser docker image (#140)
* Add platform linux/amd64 for the goreleaser docker image * Add usage in the readme file
1 parent fa5957d commit 37719ad

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ dockers:
9898
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
9999
- "--label=org.opencontainers.image.version={{.Version}}"
100100
- "--label=org.opencontainers.image.source=https://github.com/LinuxSuRen/http-downloader"
101-
- "--platform=linux/arm64"
101+
- "--platform=linux/amd64"

README-zh.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,15 @@ hd get --pre ks
4949
* 多线程
5050
* 断点续传 (TODO)
5151
* 对 GitHub release 文件下载(安装)友好
52+
53+
## 使用多阶段构建
54+
你想要在 Docker 构建中下载工具吗?这个很容易的,请查看下面的例子:
55+
56+
```dockerfile
57+
FROM ghcr.io/linuxsuren/hd:v0.0.40 as downloader
58+
RUN hd install kubesphere-sigs/[email protected]
59+
60+
FROM alpine:3.10
61+
COPY --from=downloader /usr/local/bin/ks /usr/local/bin/ks
62+
CMD ["ks"]
63+
```

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ When you first run it, please init via: `hd fetch`
5454

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

57+
## Use multi-stage builds
58+
Do you want to download tools in the Docker builds? It's pretty easy. Please see the following example:
59+
60+
```dockerfile
61+
FROM ghcr.io/linuxsuren/hd:v0.0.40 as downloader
62+
RUN hd install kubesphere-sigs/[email protected]
63+
64+
FROM alpine:3.10
65+
COPY --from=downloader /usr/local/bin/ks /usr/local/bin/ks
66+
CMD ["ks"]
67+
```
68+
5769
## As a library
5870
You can import it from `github.com/linuxsuren/http-downloader/pkg/installer`, then put the following code to your CLI.
5971
It can help you to download desired tools:

0 commit comments

Comments
 (0)