From b5438c329e88c592d6ebfeaf03df8a3c6f5cdd0b Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 17:50:48 +0200 Subject: [PATCH 1/8] Use Debian Slim as base image --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ecdddbb..e370931 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.2 -ARG BASE_IMAGE=debian:latest +ARG BASE_IMAGE=debian-slim:latest # ARG BASE_IMAGE=ubuntu:jammy FROM ${BASE_IMAGE} AS build-scripts @@ -65,4 +65,3 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD print EXPOSE 587 CMD [ "/bin/sh", "-c", "/scripts/run.sh" ] - From 217552bd56a6bf4fc3ac597d360e3b24b70f7215 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 17:52:44 +0200 Subject: [PATCH 2/8] Use Debian Slim image --- .github/workflows/tags.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tags.yml b/.github/workflows/tags.yml index 0cedb4e..dbf7bba 100644 --- a/.github/workflows/tags.yml +++ b/.github/workflows/tags.yml @@ -206,7 +206,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache/debian,mode=max,compression=estargz cache-to: type=local,dest=/tmp/.buildx-cache-new/debian build-args: | - BASE_IMAGE=debian:bookworm + BASE_IMAGE=debian:bookworm-slim - name: Move cache run: | From 852b23e986e5be77417866daaa381fbfd52ad6a5 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 17:53:53 +0200 Subject: [PATCH 3/8] Use Debian Slim image --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f17351e..c9bc475 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -185,7 +185,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache/debian,mode=max,compression=estargz cache-to: type=local,dest=/tmp/.buildx-cache-new/debian build-args: | - BASE_IMAGE=debian:bookworm + BASE_IMAGE=debian:bookworm-slim - name: Move cache run: | From 4710bbbcbbe901454e491a1cad51f23dbe25a5c5 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 18:03:32 +0200 Subject: [PATCH 4/8] Clean APT cache --- build-scripts/postfix-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-scripts/postfix-install.sh b/build-scripts/postfix-install.sh index 70a17d9..fcb62bd 100644 --- a/build-scripts/postfix-install.sh +++ b/build-scripts/postfix-install.sh @@ -18,6 +18,7 @@ do_ubuntu() { if [ "${ID}" = "debian" ]; then RELEASE_SPECIFIC_PACKAGES="netcat-openbsd" fi + export DEBCONF_NOWARNINGS=yes export DEBIAN_FRONTEND=noninteractive echo "Europe/Berlin" > /etc/timezone apt-get update -y -q @@ -25,6 +26,8 @@ do_ubuntu() { apt-get install -y postfix apt-get install -y opendkim apt-get install -y ca-certificates tzdata supervisor rsyslog bash opendkim-tools curl libcurl4 libjsoncpp25 sasl2-bin postfix-lmdb logrotate cron + apt-get clean + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* } if [ -f /etc/alpine-release ]; then From 34c53b4d00751bfafdd6fd12e6e2593d6b1ba32d Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 18:06:15 +0200 Subject: [PATCH 5/8] Merge --- build-scripts/postfix-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/postfix-install.sh b/build-scripts/postfix-install.sh index fcb62bd..a865539 100644 --- a/build-scripts/postfix-install.sh +++ b/build-scripts/postfix-install.sh @@ -25,7 +25,7 @@ do_ubuntu() { apt-get install -y libsasl2-modules apt-get install -y postfix apt-get install -y opendkim - apt-get install -y ca-certificates tzdata supervisor rsyslog bash opendkim-tools curl libcurl4 libjsoncpp25 sasl2-bin postfix-lmdb logrotate cron + apt-get install -y ca-certificates tzdata supervisor rsyslog bash opendkim-tools curl libcurl4 libjsoncpp25 sasl2-bin postfix-lmdb logrotate cron net-tools ${RELEASE_SPECIFIC_PACKAGES} apt-get clean rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* } From 136bfc2f77e8202f377161cb6be24f4ad852b783 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 18:07:50 +0200 Subject: [PATCH 6/8] Merge --- build-scripts/postfix-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/build-scripts/postfix-install.sh b/build-scripts/postfix-install.sh index a865539..f4d4243 100644 --- a/build-scripts/postfix-install.sh +++ b/build-scripts/postfix-install.sh @@ -26,8 +26,6 @@ do_ubuntu() { apt-get install -y postfix apt-get install -y opendkim apt-get install -y ca-certificates tzdata supervisor rsyslog bash opendkim-tools curl libcurl4 libjsoncpp25 sasl2-bin postfix-lmdb logrotate cron net-tools ${RELEASE_SPECIFIC_PACKAGES} - apt-get clean - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* } if [ -f /etc/alpine-release ]; then From 9ca644262ff2b1e30ad03d344b7284efb23605b4 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 18:08:33 +0200 Subject: [PATCH 7/8] Clean APT cache --- build-scripts/postfix-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-scripts/postfix-install.sh b/build-scripts/postfix-install.sh index 41cc55b..2e3b4ce 100644 --- a/build-scripts/postfix-install.sh +++ b/build-scripts/postfix-install.sh @@ -26,6 +26,8 @@ do_ubuntu() { apt-get install -y postfix apt-get install -y opendkim apt-get install -y ca-certificates tzdata supervisor rsyslog bash opendkim-tools curl libcurl4 libjsoncpp25 sasl2-bin postfix-lmdb logrotate cron net-tools ${RELEASE_SPECIFIC_PACKAGES} + apt-get clean + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* } if [ -f /etc/alpine-release ]; then From bfcb05645922f778a3d27e87e1990f602112d29e Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 27 Oct 2023 18:23:36 +0200 Subject: [PATCH 8/8] Debian Bookworm Slim --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e370931..bb1b329 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.2 -ARG BASE_IMAGE=debian-slim:latest +ARG BASE_IMAGE=debian:bookworm-slim # ARG BASE_IMAGE=ubuntu:jammy FROM ${BASE_IMAGE} AS build-scripts