From 1fdfdd0efbc39f4d7e21f8a8c1436c414f6d0aea Mon Sep 17 00:00:00 2001 From: ewa Date: Fri, 21 Nov 2025 03:19:11 +0300 Subject: [PATCH] Update Dockerfile --- .devcontainer/Dockerfile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 24ef115a..344a8cba 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1,17 @@ FROM --platform=linux/amd64 node:lts-bookworm-slim -SHELL ["/bin/bash", "-c"] -RUN apt update && apt install -y curl bash git tar gzip libc++-dev \ No newline at end of file + +# 🛡️ SHELL: Setting strict flags for better error handling in pipes +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# 🚀 OPTIMIZATION: +# 1. Combine update + install + cleanup in ONE layer. +# 2. Use --no-install-recommends to avoid bloat. +# 3. Explicitly remove apt cache files to reduce image size. +# 4. Removed 'bash', 'tar', 'gzip' as they are built-in to Bookworm. +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + curl \ + git \ + libc++-dev \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/*