Skip to content

Commit 07438be

Browse files
committed
Add gget Docker image
1 parent 29f6388 commit 07438be

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ Use `--help` to see all options and learn more about advanced usage.
5050

5151
gget --help
5252

53+
## Docker Usage
54+
55+
The `dpb587/gget` image can be used as a build stage for finding and downloading assets for use in a subsequent stage.
56+
57+
```
58+
FROM dpb587/gget as gget
59+
RUN gget --exec github.com/cloudfoundry/bosh-cli bosh=bosh-cli-*-linux-amd64
60+
RUN gget --exec github.com/cloudfoundry/bosh-bootloader bbl=bbl-*_linux_x86-64
61+
RUN gget --stdout github.com/pivotal-cf/om om-linux-*.tar.gz | tar -xzf- om
62+
63+
FROM ubuntu
64+
COPY --from=gget /result/* /usr/local/bin/
65+
...everything else for your image...
66+
```
67+
5368
## Services
5469

5570
The following services are supported through their APIs:

build/docker/gget/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM alpine as base
2+
RUN apk add --no-cache ca-certificates wget
3+
4+
ENV gget /usr/local/bin/gget
5+
RUN true \
6+
&& wget -qO "$gget" https://github.com/dpb587/gget/releases/download/v0.1.0/gget-0.1.0-linux-amd64 \
7+
&& echo "418b68caeb302898322465abc31c316a1dbdb7872cdad0fe4a9661c5118860c4 $gget" | sha256sum -c \
8+
&& chmod +x "$gget"
9+
RUN gget github.com/dpb587/gget --exec "$gget=gget-*-linux-amd64"
10+
RUN gget --version -v
11+
12+
FROM alpine
13+
RUN apk add --no-cache ca-certificates xz
14+
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
15+
COPY --from=base /usr/local/bin/gget /bin/gget
16+
RUN mkdir /result
17+
WORKDIR /result
18+
ENTRYPOINT ["/bin/gget"]
19+
CMD ["--help"]

0 commit comments

Comments
 (0)