2. Typescript Journey - Setup

Series Posts

I am going to using Dev Containers to do my development. This will allow me to use a docker container or Github Codespaces to do my Typescript development.

Here is the repo

Prerequisites

  • Docker Desktop
  • Visual Studio Code
  • Visual Studio Code Extension - Dev Containers,GitHub Codespaces

Walkthrough

  1. Setup Dev Container Configuration Files

View -> Command Palette -> Remote Containers: Add Development Container Configuration Files

  1. Choose Alpine and Latest Version
  2. Open Folder in Container
    </br>
  3. Change Dockerfile and devcontainer.json to support Typescript and Node

Dockerfile

FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-12
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install git

devcontainer.json

{
	"build": {"dockerfile": "Dockerfile"},
	"customizations": {
		"vscode": {
		  "extensions": ["dbaeumer.vscode-eslint"]
		}
	  },	
	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	 "forwardPorts": [3000]	
}

Next


3. Typescript Journey - Hello World

More