Skip to content
Snippets Groups Projects
  • Ole Langbehn's avatar
    5d97aaf2
    refactor(docker): use node slim images with major version (20|22) · 5d97aaf2
    Ole Langbehn authored
    After reading https://snyk.io/blog/choosing-the-best-node-js-docker-image/
    , I propose this change, which follows these thoughts:
    
    * Unify codebase across all projects to use slim images instead of alpine or
      normal ones. Reasonings: Security (normal images contain build tools
      unneeded in serving containers which introduce security issues), unification
      (using one type of slim|alpine simplifies code, and since alpine might cause
      performance and compatibility issues, I decided to go for slim)
    * Instead of specifying patch or minor image versions, specify only the major
      version. Reasonings: Security (with only a major version specified we benefit
      from automatic minor and patch updates, which IMO far outweighs the potential
      troubles from not updating a minor or patch version due to forgetting it)
    * Move from node:18 to node:20. Reasoning: node:18 has been in maintenance mode
      for ~1 year. node:20 will soon enter maintenance mode, but I reckoned it's
      too early/dangerous to push node:22 to everywhere.
    
    This is a proposal in form of an MR. Feel free to reject it. If you do, please
    notify me about this, so I get the opportunity to learn from your reasoning.
    5d97aaf2
    History
    refactor(docker): use node slim images with major version (20|22)
    Ole Langbehn authored
    After reading https://snyk.io/blog/choosing-the-best-node-js-docker-image/
    , I propose this change, which follows these thoughts:
    
    * Unify codebase across all projects to use slim images instead of alpine or
      normal ones. Reasonings: Security (normal images contain build tools
      unneeded in serving containers which introduce security issues), unification
      (using one type of slim|alpine simplifies code, and since alpine might cause
      performance and compatibility issues, I decided to go for slim)
    * Instead of specifying patch or minor image versions, specify only the major
      version. Reasonings: Security (with only a major version specified we benefit
      from automatic minor and patch updates, which IMO far outweighs the potential
      troubles from not updating a minor or patch version due to forgetting it)
    * Move from node:18 to node:20. Reasoning: node:18 has been in maintenance mode
      for ~1 year. node:20 will soon enter maintenance mode, but I reckoned it's
      too early/dangerous to push node:22 to everywhere.
    
    This is a proposal in form of an MR. Feel free to reject it. If you do, please
    notify me about this, so I get the opportunity to learn from your reasoning.
.gitlab-ci.yml 8.74 KiB