forked from libopenstorage/stork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (45 loc) · 2.19 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
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 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 -q -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/aws-iam-authenticator && \
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-sdk-418.0.0-linux-x86_64.tar.gz
ARG GCLOUD_INSTALL_DIR="/usr/lib"
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
ENV PATH "${PATH}:$GCLOUD_INSTALL_DIR/google-cloud-sdk/bin"
#Install gke-gcloud-auth-plugin
RUN 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 /