File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ ADD . .
1818RUN make
1919
2020# MAD HACKS: Build a version first so we can take the scsi_id bin and put it somewhere else in our real build
21- FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3 as base
21+ FROM k8s.gcr.io/build-image/debian-base-amd64:buster-v1.5.0 as mad-hack
2222RUN clean-install udev
2323
2424# Start from Kubernetes Debian base
25- FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3
25+ FROM k8s.gcr.io/build-image/debian-base-amd64:buster-v1.5.0
2626COPY --from=builder /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/bin/gce-pd-csi-driver /gce-pd-csi-driver
2727# Install necessary dependencies
2828RUN clean-install util-linux e2fsprogs mount ca-certificates udev xfsprogs
29- COPY --from=base /lib/udev/scsi_id /lib/udev_containerized/scsi_id
29+ COPY --from=mad-hack /lib/udev/scsi_id /lib/udev_containerized/scsi_id
3030
3131ENTRYPOINT ["/gce-pd-csi-driver" ]
Original file line number Diff line number Diff line change @@ -40,21 +40,26 @@ trap cleanup EXIT
4040pushd $tmpDir >& /dev/null
4141
4242opsys=windows
43+ arch=amd64
4344if [[ " $OSTYPE " == linux* ]]; then
44- opsys=linux_amd64
45+ opsys=linux
4546elif [[ " $OSTYPE " == darwin* ]]; then
4647 opsys=darwin
4748fi
4849
49- curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases | \
50- grep browser_download | \
51- grep $opsys | \
50+ # As github has a limit on what stored in releases/, and kustomize has many different package
51+ # versions, we just point directly at the version we want. See
52+ # github.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh.
53+
54+ version=v3.9.4
55+ url_base=https://api.github.com/repos/kubernetes-sigs/kustomize/releases/tags/kustomize%2F
56+ curl -s ${url_base}${version} | \
57+ grep browser_download.* ${opsys} _${arch} | \
5258 cut -d ' "' -f 4 | \
53- grep /kustomize/v3.9.4 | \
54- sort | tail -n 1 | \
59+ sort -V | tail -n 1 | \
5560 xargs curl -s -O -L
5661
57- tar xzf ./kustomize_v* _${opsys} .tar.gz
62+ tar xzf ./kustomize_v* _${opsys} _ ${arch} .tar.gz
5863
5964cp ./kustomize $where
6065
You can’t perform that action at this time.
0 commit comments