Sign inSign up

dvlashadders/vscode-typescript-node

By dvlashadders

Updated almost 2 years ago

DevContainer Image with Typescript Node 2x and AWS tools installed

Image
Developer tools
0

318

dvlashadders/vscode-typescript-node repository overview

Dev Containers

If you have an M2 mac I suggest you use devcontainers for developer environments. The first time you open the project the build will take a few minutes (docker build), after that it will be instance (a few seconds!). Many bugs have been sorted out with Docker on the M2 macs (eg file driver to host machine). I call this the Naked Mac Other than few basic tools which I installed on the host mac for example brew I have been running the last few months without any problems. I suggest give it a go, if you don't like it fine install your software the hard way bit by bit onto your mac.

This image is a result of using devcontainers adding install's and tools for my daily use. To help track my devconatiner I have created this image from my devcontainer repo allow better control of my changes to software tools I use.

read about devcontainershere. You will need too install devcontainer vscode plugin

Container setup for:

  • typescript
  • node 2x. based on the TAG
  • aws cli
  • python
  • kubectl
  • my util python scripts
  • my zsh alias

Some useful commands I have added

# using my alias loaded into zsh
aws-wp 
<shows a list of profiles in the aws config file>

# if you do not set AWS_PROFILE then you will have to add --profile <name> to commands or export AWS_PROFILE=xyz-profile using my alias
aws-sp <profile name from above list , cut and paste>

# show aws env's
aws-env

# commands set up in the shell
aws-cmd
k8-cmds

# version of stuff
v
linux-info

devcontainer json file example

// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
  "name": "eks",
  "image": "dvlashadders/vscode-typescript-node:22",
  "features": {
    "ghcr.io/devcontainers/features/aws-cli:1": {},
    "ghcr.io/devcontainers-contrib/features/aws-cdk:2": {},
    "ghcr.io/devcontainers-contrib/features/serverless:2": {
      "version": "3.38.0"
    },
    "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
    "ghcr.io/devcontainers-contrib/features/kubectx-kubens:1": {},
    "ghcr.io/rio/features/k9s:1": {}
  },
  "customizations": {
    "vscode": {
      "extensions": [
        "redhat.vscode-yaml",
        "amazonwebservices.aws-toolkit-vscode",
        "dbaeumer.vscode-eslint",
        "christian-kohler.npm-intellisense",
        "vscode-icons-team.vscode-icons",
        "mhutchie.git-graph",
        "dsznajder.es7-react-js-snippets",
        "amazonwebservices.amazon-q-vscode"
      ]
    }
  },
  // can bind from host
  "mounts": [
    "source=${localEnv:HOME}/.aws/,target=/home/node/.aws/,type=bind,consistency=cached",
    "source=${localEnv:HOME}/.ssh/,target=/home/node/.ssh/,type=bind,consistency=cached",
  ],
  // Features to add to the dev container. More info: https://containers.dev/features.
  // "features": {},
  // Use 'forwardPorts' to make a list of ports inside the container available locally.
  // "forwardPorts": [],
  // Use 'postCreateCommand' to run commands after the container is created.
  // git users can be set if required
  "postCreateCommand": {
    "arch": "uname -a",
    "cdkver": "cdk --version",
    "awsver": "aws --version",
    "slsver": "serverless --version"
    //  "cfn-nag"     : "gem install cfn-nag"
  },
  "containerEnv": {
    "AWS_DEFAULT_REGION": "eu-west-2",
    "DND_PWD": "${localEnv:PWD}"
  },
  "remoteEnv": {
    //     "AWS_SESSION_EXPIRATION": "${localEnv:AWS_SESSION_EXPIRATION}",
    //     "AWS_SECRET_ACCESS_KEY": "${localEnv:AWS_SECRET_ACCESS_KEY}",
    //     "AWS_SESSION_TOKEN": "${localEnv:AWS_SESSION_TOKEN}",
    //     "AWS_ACCESS_KEY_ID": "${localEnv:AWS_ACCESS_KEY_ID}"
  },
  // Configure tool-specific properties.
  // "customizations": {},
  // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
  // "remoteUser": "root"
  // "runArgs": [
  //   "--network=dev_container_network"
  // ]
}

you can add or remove features which is a nice way of adding tools for the job you are working on.

Tag summary

Content type

Image

Digest

sha256:83d9c3aef

Size

711.4 MB

Last updated

almost 2 years ago

docker pull dvlashadders/vscode-typescript-node:20