summaryrefslogtreecommitdiff
path: root/.devcontainer
diff options
context:
space:
mode:
authormichaelperel <michaelsethperel@gmail.com>2019-11-13 19:58:13 -0500
committerNicholas M. Iodice <niiodice@microsoft.com>2019-11-13 18:58:13 -0600
commitcf9837a93937582c44c96b9f2f0fe8d1d5c4962e (patch)
tree7cc6fe3ea3540d763c4e714a5d867e39d8462f15 /.devcontainer
parenteb3742d9eeff78eed20947d74af303982968714c (diff)
Provided better tooling for the development container (#206)
* Provided better tooling for the development container * updated Dockerfile path in CI * updated -v flag to reflect Dockerfile val * analysis tools
Diffstat (limited to '.devcontainer')
-rw-r--r--.devcontainer/Dockerfile20
-rw-r--r--.devcontainer/devcontainer.json34
2 files changed, 54 insertions, 0 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 00000000..8446cf4e
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,20 @@
+FROM ubuntu:bionic
+ARG GO_VERSION=1.13
+ARG TERRAFORM_VERSION=0.12.13
+RUN apt-get update && \
+ apt-get install wget unzip gcc git vim -y && \
+ wget "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" && \
+ tar -xvf "go${GO_VERSION}.linux-amd64.tar.gz" && \
+ mv go /usr/local && \
+ wget "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \
+ unzip "./terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -d /usr/local/bin/ && \
+ rm "go${GO_VERSION}.linux-amd64.tar.gz" && \
+ rm "terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \
+ rm -rf /var/lib/apt/lists/*
+ENV PATH="${PATH}":/usr/local/go/bin
+RUN git clone https://github.com/microsoft/terraform-provider-azuredevops.git && \
+ cd terraform-provider-azuredevops && \
+ ./scripts/build.sh && \
+ ./scripts/local-install.sh && \
+ rm -rf ../terrform-provider-azuredevops
+WORKDIR /workspaces/terraform-provider-azuredevops \ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 00000000..7f24a501
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,34 @@
+// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
+// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/docker-existing-dockerfile
+{
+ "name": "Dev Dockerfile",
+ "dockerFile": "Dockerfile",
+ // The optional 'runArgs' property can be used to specify additional runtime arguments.
+ "runArgs": [
+ // Enable go debugger
+ "--cap-add=SYS_PTRACE",
+ "--security-opt",
+ "seccomp=unconfined",
+ // Enable SSH for git
+ "-v",
+ "${env:HOME}${env:USERPROFILE}/.ssh:/root/.ssh-localhost:ro"
+ ],
+ "postCreateCommand": "mkdir -p /root/.ssh && cp -r /root/.ssh-localhost/* /root/.ssh && chmod 700 /root/.ssh && chmod 600 /root/.ssh/*",
+ "settings": {
+ "files.eol": "\n",
+ "terminal.integrated.shell.linux": "/bin/bash",
+ "go.useLanguageServer": true,
+ "go.autocompleteUnimportedPackages": true,
+ "go.gotoSymbol.includeImports": true,
+ "go.gotoSymbol.includeGoroot": true,
+ "[go]": {
+ "editor.formatOnSave": true,
+ "editor.codeActionsOnSave": {
+ "source.organizeImports": true
+ }
+ }
+ },
+ "extensions": [
+ "ms-vscode.go"
+ ]
+} \ No newline at end of file