Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # [Choice] Node.js version: 20, 18, 16
  2. ARG VARIANT=20-bullseye
  3. FROM mcr.microsoft.com/devcontainers/javascript-node:1-${VARIANT}
  4. # Install additional OS packages
  5. RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
  6. && apt-get -y install --no-install-recommends \
  7. sqlite3 \
  8. ffmpeg \
  9. handbrake-cli \
  10. curl \
  11. wget \
  12. git \
  13. htop \
  14. tree \
  15. jq \
  16. unzip \
  17. && apt-get clean \
  18. && rm -rf /var/lib/apt/lists/*
  19. # Install pnpm globally
  20. RUN npm install -g pnpm@latest
  21. # Set up pnpm store location
  22. ENV PNPM_HOME="/home/node/.local/share/pnpm"
  23. ENV PATH="$PNPM_HOME:$PATH"
  24. # Create workspace directory
  25. RUN mkdir -p /workspaces/watch-finished-turbo
  26. WORKDIR /workspaces/watch-finished-turbo
  27. # Switch to node user
  28. USER node
  29. # Set up git configuration (will be overridden by user)
  30. RUN git config --global init.defaultBranch main
  31. # Pre-install common global packages
  32. RUN pnpm add -g \
  33. turbo \
  34. typescript \
  35. @types/node \
  36. eslint \
  37. prettier \
  38. jest \
  39. playwright
  40. # Set default shell
  41. ENV SHELL=/bin/bash
  42. # Health check
  43. HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  44. CMD node --version || exit 1