Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG VARIANT=1-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}

ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

RUN apt-get update && apt-get upgrade -y && apt-get install -y software-properties-common
RUN apt-get install -y byobu tmux nano vim socat

RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
RUN apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

RUN apt-get update && apt-get install -y consul nomad terraform


ENTRYPOINT ["sleep", "infinity"]
5 changes: 5 additions & 0 deletions .devcontainer/consul.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
client {
options = {
"driver.raw_exec.no_cgroups" = "1"
}
}
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Hashicorp Lessons",
"build":{
"dockerfile": "Dockerfile",
"context": ".",
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--cap-add=SYS_ADMIN", "--security-opt", "seccomp=unconfined", "--privileged", "--init" ],
"workspaceFolder": "/workspaces/hashicorp-lessons",
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"hashicorp.terraform",
],
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.goroot": "/usr/local/go",
},
"forwardPorts": [
4646,
8500,
],
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
2 changes: 1 addition & 1 deletion 1_HELLO_WORLD/job.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ job "hello-world" {
}
}
}
}
}