Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Debian Slim as base image #149

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.2

ARG BASE_IMAGE=debian:latest
ARG BASE_IMAGE=debian:bookworm-slim
# ARG BASE_IMAGE=ubuntu:jammy

FROM ${BASE_IMAGE} AS build-scripts
Expand Down Expand Up @@ -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" ]

3 changes: 3 additions & 0 deletions build-scripts/postfix-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ 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
apt-get install -y libsasl2-modules sasl2-bin
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
Expand Down