-
Notifications
You must be signed in to change notification settings - Fork 89
/
Dockerfile
58 lines (48 loc) · 2.51 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM registry.access.redhat.com/ubi8-minimal:latest
MAINTAINER Portworx Inc. <[email protected]>
ARG VERSION=master
ARG RELEASE=latest
LABEL name="Stork" \
vendor="Openstorage.org" \
version=${VERSION} \
release=${RELEASE} \
summary="Storage Operator Runtime for Kubernetes" \
description="Stork is a Cloud Native storage operator runtime scheduler plugin"
RUN curl https://yum.portworx.com/dl/ubi8/libsolv-0.7.22-4.el8pc.x86_64.rpm -o libresolv.rpm && rpm -U libresolv.rpm && rm -f libresolv.rpm
RUN microdnf clean all && microdnf install -y python3.9 ca-certificates tar gzip openssl curl git findutils unzip
RUN python3 -m pip install awscli && python3 -m pip install oci-cli && python3 -m pip install rsa --upgrade
RUN curl -Lo /usr/local/bin/aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.6.21/aws-iam-authenticator_0.6.21_linux_amd64 && \
chmod +x /usr/local/bin/aws-iam-authenticator
#Install asdf
RUN git clone https://github.com/asdf-vm/asdf.git $HOME/.asdf --branch v0.12.0
RUN echo -e '\n. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
RUN echo -e '\n. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
RUN . $HOME/.asdf/asdf.sh
ENV PATH "${PATH}:$HOME/root/.asdf/bin:$HOME/root/.asdf/shims"
#Install kubelogin plugin
RUN asdf update
RUN asdf plugin add kubelogin
RUN asdf install kubelogin latest
RUN asdf global kubelogin latest
#Install Google Cloud SDK
ARG GCLOUD_SDK=google-cloud-cli-489.0.0-linux-x86_64.tar.gz
ARG GCLOUD_INSTALL_DIR="/usr/lib"
ENV PATH "${PATH}:$GCLOUD_INSTALL_DIR/google-cloud-sdk/bin"
# Download GCLOUD_SDK tar bundle, untar it , install gke-gcloud-auth-plugin
# and remove the tar bundle and all directory contents except bin directory
RUN curl -q -o $GCLOUD_SDK https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/$GCLOUD_SDK && \
tar xf $GCLOUD_SDK -C $GCLOUD_INSTALL_DIR && rm -rf $GCLOUD_SDK && \
rm -rf $GCLOUD_INSTALL_DIR/google-cloud-sdk/platform/gsutil \
$GCLOUD_INSTALL_DIR/google-cloud-sdk/RELEASE_NOTES && \
gcloud components install gke-gcloud-auth-plugin
#Create symlink /google-cloud-sdk/bin -> /usr/lib/google-cloud-sdk/bin for legacy cluster pair with gcp auth plugin
RUN mkdir google-cloud-sdk
RUN ln -s /usr/lib/google-cloud-sdk/bin /google-cloud-sdk/bin
WORKDIR /
COPY ./bin/linux/storkctl /storkctl/linux/
COPY ./bin/darwin/storkctl /storkctl/darwin/
COPY ./bin/windows/storkctl.exe /storkctl/windows/
COPY ./LICENSE /licenses
COPY ./bin/stork /
COPY ./bin/px_statfs.so /
COPY ./bin/px_statfs.so.sha256 /