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/*