Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
FROM debian:bookworm-slim
# NOTE:
# 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


WORKDIR /app

COPY linux-sysmonitor/ .
RUN chmod +x health-check.sh

FROM debian:bookworm-slim

WORKDIR /app

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/*
ENTRYPOINT [ "./health-check.sh" ]

COPY linux-sysmonitor/ .
RUN chmod +x health-check.sh
ENTRYPOINT [ "./health-check.sh" ]