Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 474 Bytes

ng_devcontainer.md

File metadata and controls

32 lines (24 loc) · 474 Bytes

Angular devcontainer

Dockerfile:

# Creting image based on node bullseye
FROM node:16.20-bullseye

# Set the working directory
WORKDIR /app
EXPOSE 4200

# Install dependencies
RUN apt-get update && apt-get install -yq dep1 dep2 ...

# Setting nonroot user in container
USER "node"

devcontainer.json:

{
  "name": "ng-dc",
  "build": {
    "context": "..",
    "dockerfile": "./Dockerfile"
  },
  "postCreateCommand": "cd app && yarn"
}