Skip to content

Commit

Permalink
Update the devcontainer (home-assistant#128)
Browse files Browse the repository at this point in the history
Currently, the devcontainer no longer builds (presumably due to outdated
GPG keys). Bump to latest version and pin the Debian version as well.
  • Loading branch information
agners authored Mar 15, 2023
1 parent 39d3f96 commit 7bce7d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
11 changes: 5 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# [Choice] Go version: 1, 1.15, 1.14
ARG VARIANT=1
ARG VARIANT=1-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}

# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand All @@ -17,9 +16,9 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \


# [Optional] Uncomment the next line to use go get to install anything else you need
RUN go get -x github.com/coreos/go-systemd/daemon
RUN go get -x github.com/fntlnz/mountinfo
RUN go get -x github.com/godbus/dbus
# RUN go get -x github.com/coreos/go-systemd/daemon
# RUN go get -x github.com/fntlnz/mountinfo
# RUN go get -x github.com/godbus/dbus

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
5 changes: 2 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "1.15",
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*"
"VARIANT": "1.19-bullseye",
"NODE_VERSION": "none"
}
},
"postCreateCommand": "go mod download",
Expand Down

0 comments on commit 7bce7d6

Please sign in to comment.