Dockerfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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:1-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. ENV LANG=ja_JP.UTF-8
  14. RUN mkdir -p /workspace/growi/node_modules
  15. RUN mkdir -p /workspace/growi/apps/pdf-converter/node_modules
  16. # [Optional] Update UID/GID if needed
  17. RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
  18. groupmod --gid $USER_GID $USERNAME \
  19. && usermod --uid $USER_UID --gid $USER_GID $USERNAME; \
  20. fi
  21. RUN chown -R $USER_UID:$USER_GID /home/$USERNAME /workspace;
  22. # Uncomment to default to non-root user
  23. # USER $USER_UID
  24. RUN apt-get update \
  25. && apt-get -y install --no-install-recommends \
  26. chromium locales fonts-ipafont fonts-ipaexfont fonts-ipafont-gothic fonts-ipafont-mincho git-lfs && \
  27. echo "ja_JP UTF-8" > /etc/locale.gen && locale-gen
  28. RUN yarn global add turbo
  29. RUN git config --global --add safe.directory /workspace/growi