-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ARG VARIANT="focal" | ||
|
||
# To build without user input | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
FROM ubuntu:${VARIANT} | ||
|
||
ENV TERRAFORM_VERSION=0.12.29 | ||
ENV GO_VERSION=1.14.9 | ||
|
||
RUN apt-get update && apt-get install -y curl zip make gcc git | ||
|
||
# Make shared download folder | ||
RUN mkdir -p /tmp/docker-downloads | ||
|
||
# Install Terraform | ||
RUN curl -sSL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o /tmp/docker-downloads/terraform.zip \ | ||
&& unzip /tmp/docker-downloads/terraform.zip \ | ||
&& mv terraform /usr/local/bin | ||
|
||
# Install Go into /usr/local/go | ||
RUN curl -fsS https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz -o /tmp/docker-downloads/golang.tar.gz \ | ||
&& tar -C /usr/local -xvf /tmp/docker-downloads/golang.tar.gz | ||
|
||
ENV PATH=$PATH:/usr/local/go/bin | ||
|
||
# Remove shared download folder | ||
RUN rm -rf /tmp/docker-downloads | ||
|
||
ENV DEBIAN_FRONTEND=interactive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.1/containers/ubuntu | ||
{ | ||
"name": "Terraform Provider AzureRM", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
}, | ||
"runArgs": [ | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.ssh:/root/.ssh-localhost:ro", | ||
"--env-file", ".env.sh", | ||
], | ||
"postCreateCommand": "mkdir -p /root/.ssh && cp -r /root/.ssh-localhost/* /root/.ssh && chmod 700 /root/.ssh && chmod 600 /root/.ssh/*", | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"golang.go", | ||
"streetsidesoftware.code-spell-checker", | ||
"eamodio.gitlens", | ||
"yzhang.markdown-all-in-one", | ||
"davidanson.vscode-markdownlint" | ||
] | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "uname -a", | ||
|
||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. | ||
// "remoteUser": "vscode" | ||
|
||
} |