forked from zerotrustlabs/devops-playground-kyverno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (26 loc) · 1.36 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
FROM ghcr.io/devopsplayground/base-container:latest
# Installing kubectl
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
chmod +x kubectl && \
mkdir -p ~/.local/bin && \
mv ./kubectl ~/.local/bin/kubectl
# install helm
RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null && \
apt-get install apt-transport-https --yes && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \
apt-get update && \
apt-get install helm
# create kube config folder
RUN mkdir /root/.kube && \
echo "" > /root/.kube/config
# Clone Playground repo
RUN cd /root/workdir && \
git clone https://github.com/DevOpsPlayground/zero-trust-kyverno
# Adding Kyverno & Prometheus Community Helm repository
RUN helm repo add kyverno https://kyverno.github.io/kyverno/ && \
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts && \
helm repo update
# ~/.bashrc update
RUN echo 'alias aws_creds="env | grep AWS"' >> ~/.bashrc && \
echo 'alias workdir="cd ~/workdir/zero-trust-kyverno"' >> ~/.bashrc