Skip to content

Commit

Permalink
feat: add devcontainer support
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebedo committed Jan 28, 2024
1 parent 7005dea commit c8cdac1
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM ubuntu:mantic

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
ca-certificates=20230311ubuntu1 \
apt-utils=2.7.3 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update \
&& apt-get -y install --no-install-recommends \
git=1:2.40.1-1ubuntu1 \
golang=2:1.21~2 \
zsh=5.9-5ubuntu1 \
tree=2.1.1-1 \
neovim=0.7.2-7 \
wget=1.21.3-1ubuntu1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN export GOBIN=/usr/local/bin \
&& go install github.com/golangci/golangci-lint/cmd/[email protected] \
&& go install golang.org/x/tools/[email protected] \
&& go install github.com/goreleaser/[email protected] \
&& go install github.com/go-delve/delve/cmd/[email protected]

RUN wget -q -O /usr/local/bin/hadolint \
https://github.com/hadolint/hadolint/releases/download/v2.8.0/hadolint-Linux-x86_64 \
&& chmod +x /usr/local/bin/hadolint

ENV DEBIAN_FRONTEND=dialog

SHELL ["/bin/zsh", "-c"]
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Dnsdock dev container",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/zsh",
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "zsh",
"icon": "terminal-bash"
}
}
},
"extensions": [
"ms-azuretools.vscode-docker",
"premparihar.gotestexplorer",
"golang.go",
"github.vscode-github-actions",
"KnisterPeter.vscode-commitizen",
"eamodio.gitlens",
"mhutchie.git-graph",
"yzhang.markdown-all-in-one",
"esbenp.prettier-vscode"
]
}
}
}

0 comments on commit c8cdac1

Please sign in to comment.