Dockerfile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #-------------------------------------------------------------------------------------------------------------
  2. # Copyright (c) Microsoft Corporation. All rights reserved.
  3. # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
  4. #-------------------------------------------------------------------------------------------------------------
  5. FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-20
  6. # The node image includes a non-root user with sudo access. Use the
  7. # "remoteUser" property in devcontainer.json to use it. On Linux, update
  8. # these values to ensure the container user's UID/GID matches your local values.
  9. # See https://aka.ms/vscode-remote/containers/non-root-user for details.
  10. ARG USERNAME=node
  11. ARG USER_UID=1000
  12. ARG USER_GID=$USER_UID
  13. RUN mkdir -p /workspace/growi/.pnpm-store
  14. RUN mkdir -p /workspace/growi/node_modules
  15. RUN mkdir -p /workspace/growi/apps/app/node_modules
  16. RUN mkdir -p /workspace/growi/apps/slackbot-proxy/node_modules
  17. RUN mkdir -p /workspace/growi/apps/app/.next
  18. # [Optional] Update UID/GID if needed
  19. RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
  20. groupmod --gid $USER_GID $USERNAME \
  21. && usermod --uid $USER_UID --gid $USER_GID $USERNAME; \
  22. fi
  23. RUN chown -R $USER_UID:$USER_GID /home/$USERNAME /workspace;
  24. # *************************************************************
  25. # * Uncomment this section to use RUN instructions to install *
  26. # * any needed dependencies after executing "apt-get update". *
  27. # * See https://docs.docker.com/engine/reference/builder/#run *
  28. # *************************************************************
  29. ENV DEBIAN_FRONTEND=noninteractive
  30. # Prepare to install Chrome for VRT
  31. RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
  32. RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
  33. RUN apt-get update \
  34. && apt-get -y install --no-install-recommends \
  35. git-lfs \
  36. iputils-ping net-tools dnsutils \
  37. # Uncomment below lines to install Chromium
  38. # --- works only on AMD64 ---
  39. # && apt-get -y install --no-install-recommends chromium \
  40. # libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb fonts-noto-cjk \
  41. # Clean up
  42. && apt-get autoremove -y \
  43. && apt-get clean -y \
  44. && rm -rf /var/lib/apt/lists/*
  45. ENV DEBIAN_FRONTEND=dialog
  46. RUN npm install -g pnpm
  47. RUN npm install -g turbo
  48. # RUN npm install -g node-gyp
  49. # Uncomment to default to non-root user
  50. # USER $USER_UID