Dockerfile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
  2. ARG VARIANT=16-bullseye
  3. FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
  4. # [Optional] Uncomment this section to install additional OS packages.
  5. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
  6. # && apt-get -y install --no-install-recommends <your-package-list-here>
  7. # [Optional] Uncomment if you want to install an additional version of node using nvm
  8. # ARG EXTRA_NODE_VERSION=10
  9. # RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
  10. # [Optional] Uncomment if you want to install more global node modules
  11. # RUN su node -c "npm install -g <your-package-list-here>"
  12. EXPOSE 3000
  13. ENV DEBIAN_FRONTEND=noninteractive
  14. # Add Docker Source
  15. RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  16. RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
  17. $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
  18. # Install the packages we need
  19. RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get install -qy \
  20. bash \
  21. build-essential \
  22. curl \
  23. docker-ce-cli \
  24. jq \
  25. less \
  26. git \
  27. gnupg2 \
  28. nano \
  29. pandoc \
  30. unzip \
  31. wget
  32. # avoid million NPM install messages
  33. ENV npm_config_loglevel warn
  34. # allow installing when the main user is root
  35. ENV npm_config_unsafe_perm true
  36. # disable NPM funding messages
  37. ENV npm_config_fund false
  38. # Colorize the bash shell
  39. RUN sed -i 's/#force_color_prompt=/force_color_prompt=/' /root/.bashrc
  40. # Fetch wait-for utility
  41. ADD https://raw.githubusercontent.com/eficode/wait-for/v2.1.3/wait-for /usr/local/bin/
  42. RUN chmod +rx /usr/local/bin/wait-for
  43. # Copy the startup file
  44. COPY app-init.sh /docker-init.sh
  45. RUN sed -i 's/\r$//' /docker-init.sh && \
  46. chmod +x /docker-init.sh
  47. # Create workspace
  48. RUN mkdir -p /workspace
  49. WORKDIR /workspace