From 2fe285c991bbf4a16cc9f8549ff938e7b668d643 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 09:56:26 +0000 Subject: [PATCH 01/10] multi-stage image --- dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dockerfile b/dockerfile index f8b90d3..e9b1d9c 100644 --- a/dockerfile +++ b/dockerfile @@ -3,12 +3,6 @@ FROM debian:bookworm-slim WORKDIR /app -RUN apt-get update && apt-get install -y \ - procps \ - iputils-ping \ - iproute2 \ - bash && rm -rf /var/lib/apt/lists/* - COPY linux-sysmonitor/ . RUN chmod +x health-check.sh ENTRYPOINT [ "./health-check.sh" ] \ No newline at end of file From 5e9bb8ab7c5d5d1f81d593656d4c43c08127bd5a Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 09:57:44 +0000 Subject: [PATCH 02/10] multi-stage image --- dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dockerfile b/dockerfile index e9b1d9c..671e0fb 100644 --- a/dockerfile +++ b/dockerfile @@ -4,5 +4,4 @@ FROM debian:bookworm-slim WORKDIR /app COPY linux-sysmonitor/ . -RUN chmod +x health-check.sh -ENTRYPOINT [ "./health-check.sh" ] \ No newline at end of file +RUN chmod +x health-check.sh \ No newline at end of file From fff16f5edc6ff7ac0aa7a1ea4a3ab5fa3702115c Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 09:58:38 +0000 Subject: [PATCH 03/10] multi-stage image --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 671e0fb..0089e0a 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,4 @@ -FROM debian:bookworm-slim +FROM debian:bookworm-slim AS builder WORKDIR /app From cd00c17e90b77360e88d759b814e7751f77e9c0f Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 10:02:00 +0000 Subject: [PATCH 04/10] multi-stage image --- dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 0089e0a..1e519b7 100644 --- a/dockerfile +++ b/dockerfile @@ -4,4 +4,7 @@ FROM debian:bookworm-slim AS builder WORKDIR /app COPY linux-sysmonitor/ . -RUN chmod +x health-check.sh \ No newline at end of file +RUN chmod +x health-check.sh + +FROM debian:bookworm-slim + From 2c71157052f42febb7911c11b7d7cd62adf436dc Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 10:02:14 +0000 Subject: [PATCH 05/10] multi-stage image --- dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/dockerfile b/dockerfile index 1e519b7..6e9a168 100644 --- a/dockerfile +++ b/dockerfile @@ -8,3 +8,4 @@ RUN chmod +x health-check.sh FROM debian:bookworm-slim +WORKDIR /app \ No newline at end of file From af7939106038b77681b7f9ed9a277643e331d1fe Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 10:03:53 +0000 Subject: [PATCH 06/10] multi-stage image --- dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 6e9a168..f3a63bc 100644 --- a/dockerfile +++ b/dockerfile @@ -8,4 +8,6 @@ RUN chmod +x health-check.sh FROM debian:bookworm-slim -WORKDIR /app \ No newline at end of file +WORKDIR /app + +COPY --from=builder /app/health-check.sh . \ No newline at end of file From 3e4ea84b7ebbf25fa33975f7607d124ce568fd79 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 10:05:38 +0000 Subject: [PATCH 07/10] multi-stage image --- dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index f3a63bc..6ba1989 100644 --- a/dockerfile +++ b/dockerfile @@ -10,4 +10,11 @@ FROM debian:bookworm-slim WORKDIR /app -COPY --from=builder /app/health-check.sh . \ No newline at end of file +COPY --from=builder /app/health-check.sh . + +RUN apt-get update && apt-get install -y \ + procps \ + iputils-ping \ + iproute2 \ + bash && rm -rf /var/lib/apt/lists/* + \ No newline at end of file From 0b3d76dee2ea039ee347ee960ea791630170bd49 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 10:05:56 +0000 Subject: [PATCH 08/10] multi-stage image --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 6ba1989..ba704b9 100644 --- a/dockerfile +++ b/dockerfile @@ -17,4 +17,4 @@ RUN apt-get update && apt-get install -y \ iputils-ping \ iproute2 \ bash && rm -rf /var/lib/apt/lists/* - \ No newline at end of file +ENTRYPOINT [ "./health-check.sh" ] \ No newline at end of file From 33348324ff1a9e7f88009b83db40fcd36557586d Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 10:23:59 +0000 Subject: [PATCH 09/10] multi-stage image --- dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index ba704b9..bdc0cc4 100644 --- a/dockerfile +++ b/dockerfile @@ -1,3 +1,9 @@ +# NOTE: +# linux-sysmonitor is a Bash application, so there are no compiled build artifacts. +# This multi-stage build demonstrates the builder/runtime pattern. +# For compiled applications (e.g., Go), the builder would compile the application, +# and the runtime would copy only the compiled binary, resulting in a much smaller image. + FROM debian:bookworm-slim AS builder @@ -17,4 +23,5 @@ RUN apt-get update && apt-get install -y \ iputils-ping \ iproute2 \ bash && rm -rf /var/lib/apt/lists/* -ENTRYPOINT [ "./health-check.sh" ] \ No newline at end of file +ENTRYPOINT [ "./health-check.sh" ] + From eb0fd802863e4c0a96de63278dbf0f73d4163715 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 10:27:06 +0000 Subject: [PATCH 10/10] multi-stage image --- dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dockerfile b/dockerfile index bdc0cc4..0f7b067 100644 --- a/dockerfile +++ b/dockerfile @@ -1,8 +1,8 @@ # NOTE: -# linux-sysmonitor is a Bash application, so there are no compiled build artifacts. -# This multi-stage build demonstrates the builder/runtime pattern. -# For compiled applications (e.g., Go), the builder would compile the application, -# and the runtime would copy only the compiled binary, resulting in a much smaller image. +# linux-sysmonitor is a Bash-based application, so there are no compiled build artifacts. +# This multi-stage build demonstrates the builder/runtime pattern. The builder prepares +# the application, while the runtime contains only the files and dependencies required +# to execute the script. FROM debian:bookworm-slim AS builder