Dockerfile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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-12
  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. # [Optional] Update UID/GID if needed
  14. RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
  15. groupmod --gid $USER_GID $USERNAME \
  16. && usermod --uid $USER_UID --gid $USER_GID $USERNAME \
  17. && chown -R $USER_UID:$USER_GID /home/$USERNAME /workspace; \
  18. fi
  19. # *************************************************************
  20. # * Uncomment this section to use RUN instructions to install *
  21. # * any needed dependencies after executing "apt-get update". *
  22. # * See https://docs.docker.com/engine/reference/builder/#run *
  23. # *************************************************************
  24. # ENV DEBIAN_FRONTEND=noninteractive
  25. # RUN apt-get update \
  26. # && apt-get -y install --no-install-recommends <your-package-list-here> \
  27. # #
  28. # # Clean up
  29. # && apt-get autoremove -y \
  30. # && apt-get clean -y \
  31. # && rm -rf /var/lib/apt/lists/*
  32. # ENV DEBIAN_FRONTEND=dialog
  33. # Uncomment to default to non-root user
  34. # USER $USER_UID