Skip to content

Commit e2e69d5

Browse files
committed
Add downloader container image
1 parent 65449a6 commit e2e69d5

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

builder/downloader/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM gcr.io/absolute-realm-611/kubereview-base
2+
COPY download.sh download.sh
3+
ENTRYPOINT ["/download.sh"]

builder/downloader/download.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
set -eu
4+
set -x
5+
6+
mkdir -p /tmp/extracted
7+
wget -O /tmp/out.zip "$1"
8+
unzip -d /tmp/extracted /tmp/out.zip
9+
unset dir
10+
# GitHub zip files always have an inner directory with a name based on repo /
11+
# ref. Assume it's the only one and give it a known name.
12+
dir="$(ls /tmp/extracted)"
13+
mv "/tmp/extracted/$dir" /workspace/src

docker/base/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM alpine
2+
RUN apk update && apk add openssl ca-certificates

0 commit comments

Comments
 (0)