This commit is contained in:
jarek
2026-03-02 10:54:30 +01:00
parent e9e521656c
commit 77ec974d09
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -3,6 +3,7 @@
*
* Provides compose-first stack operations for internal, git, and external stacks.
* All lifecycle operations use docker compose commands.
* v1.0.20
*/
import { existsSync, mkdirSync, rmSync, readdirSync, cpSync, statSync, unlinkSync, renameSync, readFileSync, writeFileSync } from 'node:fs';
+6
View File
@@ -130,6 +130,12 @@ function buildCreateConfig(inspectData: any, newImage: string): any {
// Clear MacAddress for Docker API < 1.44 compatibility
delete createConfig.MacAddress;
// Clear Entrypoint and Cmd so the new image's defaults are used.
// This prevents carrying over a stale entrypoint from a previous runtime
// (e.g. Bun's docker-entrypoint.sh → Node.js docker-entrypoint-node.sh).
delete createConfig.Entrypoint;
delete createConfig.Cmd;
// Clear Hostname so Docker assigns the new container's own ID
// Otherwise the old container's hostname is inherited, breaking self-identification
delete createConfig.Hostname;