Skip to content

Commit

Permalink
refactor: build devcontainer with Go and Terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrennand committed Nov 18, 2023
1 parent 5032d86 commit deb8852
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ghcr.io/ansible/creator-ee:v0.21.0

# Install mkdocs-material
RUN pip install mkdocs-material==9.4.9

# Install Go
RUN curl -OL https://go.dev/dl/go1.21.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin

# Install Terraform
RUN microdnf install -y yum-utils && \
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo && \
microdnf -y install terraform
9 changes: 5 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"image": "ghcr.io/ansible/creator-ee:v0.20.0",
"build": {
"dockerfile": "Dockerfile"
},
"mounts": [
"source=/run/host-services/ssh-auth.sock,target=/run/host-services/ssh-auth.sock,type=bind"
],
Expand All @@ -13,10 +15,9 @@
"redhat.ansible",
"github.copilot",
"yzhang.markdown-all-in-one",
"eamodio.gitlens"
"hashicorp.terraform"
]
}
},
"postStartCommand": "git config --global --unset gpg.'ssh'.program",
"postCreateCommand": "pip install mkdocs-material"
"postStartCommand": "git config --global --unset gpg.'ssh'.program"
}

0 comments on commit deb8852

Please sign in to comment.