Skip to content

Commit

Permalink
chore: .devcontainer updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Nov 17, 2023
1 parent 552dcf8 commit c7a27c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.202.1/containers/typescript-node/.devcontainer/base.Dockerfile

ARG VARIANT="20-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
FROM mcr.microsoft.com/devcontainers/typescript-node:1-${VARIANT}

RUN printf "alias cls='clear'\nalias ll='ls -l --human-readable --color=auto --group-directories-first --classify --time-style=long-iso -all'" >> /etc/bash.bashrc

RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install --lts"

RUN su node -c "npm install -g jest ts-node-dev npm-check-updates npm@latest"

RUN mkdir $HOME/logs
RUN su node -c "npm install -g jest ts-node-dev npm-check-updates npm@latest"
11 changes: 5 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.1/containers/typescript-node
{
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"name": "Node.js & TypeScript",
"runArgs": ["--init"],
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "16",
"BUILDKIT_INLINE_CACHE": "0"
}
"dockerfile": "Dockerfile"
},

"mounts": [
Expand All @@ -19,16 +16,18 @@
// Add the IDs of extensions you want installed when the container is created.

"postCreateCommand": "TYPOS_V=$(curl -s 'https://api.github.com/repos/crate-ci/typos/releases/latest' | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\\1/') && mkdir /tmp/typos && wget \"https://github.com/crate-ci/typos/releases/download/$TYPOS_V/typos-$TYPOS_V-x86_64-unknown-linux-musl.tar.gz\" -O \"/tmp/typos-$TYPOS_V-x86_64-unknown-linux-musl.tar.gz\" && tar -xvf \"/tmp/typos-$TYPOS_V-x86_64-unknown-linux-musl.tar.gz\" -C /tmp/typos && install -Dm 755 /tmp/typos/typos -t \"${HOME}/.local/bin\" && rm -rf /tmp/typos",

"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bungcip.better-toml",
"christian-kohler.path-intellisense",
"dbaeumer.vscode-eslint",
"meganrogge.template-string-converter",
"mutantdino.resourcemonitor",
"timonwong.shellcheck",
"redhat.vscode-yaml",
"vue.volar",
"vue.vscode-typescript-vue-plugin",
"wix.vscode-import-cost",
Expand Down

0 comments on commit c7a27c3

Please sign in to comment.