aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2024-06-10 12:32:39 +0200
committerGravatar Johannes Christ <[email protected]>2024-06-10 12:32:39 +0200
commitf9f566d6468786027d176cb22154bdf76eea485c (patch)
treef29498e25c46479faf4dbf1cf448fe4c4e2d296a
parentUpdate README blurb (diff)
Slim down image to 15 MBHEADmain
Base the image off Alpine to get another nice size saving: REPOSITORY TAG IMAGE ID CREATED SIZE localhost/inotify alpine 0346632c3067 4 hours ago 15 MB localhost/inotify debian 2d99b1b27626 4 hours ago 94 MB Functionality remains the same.
-rw-r--r--Dockerfile9
-rwxr-xr-xmonitor.sh2
2 files changed, 3 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index 3a6523e..aaf8bf8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,15 +1,10 @@
-FROM debian:12-slim
+FROM alpine:3.20
# Add inotify-tools for inotifywait
#
# We also install curl as scripts using this image often
# call HTTP webhooks.
-RUN apt-get -y update && apt-get install -y \
- curl \
- inotify-tools \
- jq \
- && apt autoclean \
- && rm -rf /var/lib/apt/lists/*
+RUN apk add --no-cache curl inotify-tools jq
# Set our working directory
WORKDIR /app
diff --git a/monitor.sh b/monitor.sh
index c40055c..e853f64 100755
--- a/monitor.sh
+++ b/monitor.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
set -exo pipefail