-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
64 lines (51 loc) · 1.85 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
59
60
61
62
63
64
FROM python:3.9.10-slim
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin:/tfenv/bin
ENV GOOGLE_CLOUD_SDK_VERSION=402.0.0
ENV TERRAFORM_VERSION=1.2.9
ENV KUBE_SCORE_VERSION=1.11.0
ENV TFSEC_VERSION=1.27.6
ENV KAPP_VERSION=0.35.0
ENV OPA_VERSION=0.49.2
RUN \
apt-get update \
&& apt-get -y install --no-install-recommends curl unzip git \
&& rm -rf /var/lib/apt/lists/*
RUN \
curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GOOGLE_CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \
> /tmp/google-cloud-sdk.tar.gz \
&& mkdir -p /usr/local/gcloud \
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \
&& /usr/local/gcloud/google-cloud-sdk/install.sh \
&& rm -v /tmp/google-cloud-sdk.tar.gz \
&& gcloud -q components install kubectl alpha beta
RUN \
curl -L https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64 \
> /bin/kubectl-argo-rollouts \
&& chmod +x /bin/kubectl-argo-rollouts
RUN \
git clone https://github.com/tfutils/tfenv.git /tfenv \
&& tfenv install ${TERRAFORM_VERSION}
RUN \
curl -L https://github.com/vmware-tanzu/carvel-kapp/releases/download/v${KAPP_VERSION}/kapp-linux-amd64 \
> /bin/kapp \
&& chmod +x /bin/kapp
RUN \
curl -L https://github.com/zegl/kube-score/releases/download/v${KUBE_SCORE_VERSION}/kube-score_${KUBE_SCORE_VERSION}_linux_amd64 \
> /bin/kube-score \
&& chmod +x /bin/kube-score
RUN \
curl -L https://github.com/liamg/tfsec/releases/download/v${TFSEC_VERSION}/tfsec-linux-amd64 \
> /bin/tfsec \
&& chmod +x /bin/tfsec
RUN \
curl -L https://github.com/open-policy-agent/opa/releases/download/v${OPA_VERSION}/opa_linux_amd64_static \
> /bin/opa \
&& chmod +x /bin/opa
RUN \
mkdir fy
COPY . /fy
RUN \
pip install poetry \
&& poetry config virtualenvs.create false \
&& cd fy \
&& poetry install