-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (37 loc) · 1.68 KB
/
Dockerfile
File metadata and controls
41 lines (37 loc) · 1.68 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
33
34
35
36
37
38
39
40
41
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
# Install dependencies
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
curl \
wget \
unzip \
gnupg \
lsb-release \
software-properties-common \
ca-certificates \
apt-transport-https \
python3 \
python3-pip \
pre-commit shellcheck \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Terraform
RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list \
&& apt-get update \
&& apt-get install -y terraform \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Google Cloud CLI
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& apt-get update \
&& apt-get install -y google-cloud-cli \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.20.0/terraform-docs-v0.20.0-$(uname)-amd64.tar.gz \
&& tar -xzf terraform-docs.tar.gz \
&& chmod +x terraform-docs \
&& mv terraform-docs /usr/local/bin
# Verify installations
RUN terraform --version && gcloud --version