-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (28 loc) · 1.8 KB
/
Dockerfile
File metadata and controls
32 lines (28 loc) · 1.8 KB
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 alpine:3.21.2
ARG TERRAFORM_VERSION=1.10.4
ARG TERRAGRUNT_VERSION=v0.72.0
RUN apk add -u bash bash-completion ansible k9s helm curl unzip yq jq \
# GCloud
# && curl -sSL https://sdk.cloud.google.com > /tmp/gcl && bash /tmp/gcl --install-dir=/opt/gcloud --disable-prompts \
# && /opt/gcloud/google-cloud-sdk/bin/gcloud components update \
# && /opt/gcloud/google-cloud-sdk/bin/gcloud components install beta \
# && /opt/gcloud/google-cloud-sdk/bin/gcloud components install gsutil \
# && /opt/gcloud/google-cloud-sdk/bin/gcloud components install kubectl \
# && /opt/gcloud/google-cloud-sdk/bin/gcloud components install gke-gcloud-auth-plugin \
# # terraform
# && curl -sL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o /tmp/terraform.zip && unzip /tmp/terraform.zip -d /tmp/terraform && install /tmp/terraform/terraform /usr/local/bin \
# # terragrunt
# && curl -sL https://github.com/gruntwork-io/terragrunt/releases/download/${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 -o /tmp/terragrunt && install /tmp/terragrunt /usr/local/bin \
# clean up /tmp
&& rm -rf /tmp/* \
&& apk del unzip curl && apk cache -f purge
RUN adduser -h /home/devops -s /bin/bash --uid 1000 -G users -D devops \
&& echo 'export PS1="\e[0;32m[\u@\h \W]\$ \e[m "' >>/etc/bash/bashrc \
&& echo "alias ll='ls -halF --color=auto'" >>/etc/bash/bashrc \
# && echo 'source /opt/gcloud/google-cloud-sdk/path.bash.inc' >>/etc/bash/bashrc \
# && echo 'source /opt/gcloud/google-cloud-sdk/completion.bash.inc' >>/etc/bash/bashrc \
&& echo 'source <(kubectl completion bash)' >>/etc/bash/bashrc \
&& echo 'alias k=kubectl' >>/etc/bash/bashrc \
&& echo 'complete -F __start_kubectl k' >>/etc/bash/bashrc
USER devops
CMD ["/bin/bash"]