[PR #202] [MERGED] Improve Docker cache efficiency and fix signal handling #952

Closed
opened 2026-02-04 21:40:27 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/plankanban/planka/pull/202
Author: @lorenz
Created: 2/5/2022
Status: Merged
Merged: 2/8/2022
Merged by: @meltyshev

Base: masterHead: docker-improvements


📝 Commits (1)

  • 2aa8bb0 Improve Docker cache efficiency and fix signal handling

📊 Changes

2 files changed (+16 additions, -12 deletions)

View changed files

📝 Dockerfile (+13 -9)
📝 docker-start.sh (+3 -3)

📄 Description

The current Dockerfile performs an expensive install of all node modules for every source change. That's not necessary as npm install only depends on the package.json, package-lock.json and .npmrc files. This change leads to much better use of Docker's layer cache, keeping all NPM packages in a cached layer as long as only code is changed.

It also fixes an issue where SIGTERMs sent to the container wouldn't get delivered to NodeJS because bash ran as PID 1 and does not forward signals. By exec'ing into node it is now PID 1 inside the container and thus gets the SIGTERM directly.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/plankanban/planka/pull/202 **Author:** [@lorenz](https://github.com/lorenz) **Created:** 2/5/2022 **Status:** ✅ Merged **Merged:** 2/8/2022 **Merged by:** [@meltyshev](https://github.com/meltyshev) **Base:** `master` ← **Head:** `docker-improvements` --- ### 📝 Commits (1) - [`2aa8bb0`](https://github.com/plankanban/planka/commit/2aa8bb02e0a9bfd79af733830a68f5ec39aa104b) Improve Docker cache efficiency and fix signal handling ### 📊 Changes **2 files changed** (+16 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+13 -9) 📝 `docker-start.sh` (+3 -3) </details> ### 📄 Description The current Dockerfile performs an expensive install of all node modules for every source change. That's not necessary as npm install only depends on the `package.json`, `package-lock.json` and `.npmrc` files. This change leads to much better use of Docker's layer cache, keeping all NPM packages in a cached layer as long as only code is changed. It also fixes an issue where SIGTERMs sent to the container wouldn't get delivered to NodeJS because bash ran as PID 1 and does not forward signals. By exec'ing into node it is now PID 1 inside the container and thus gets the SIGTERM directly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-04 21:40:27 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#952