From 1175a38d8b4f4acf2a50af830db608cdd1e4a648 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Fri, 5 Apr 2024 13:27:05 +0000 Subject: [PATCH] Upgrade base OS to Alpine 3.19, minor ElastiCache fix --- Dockerfile | 17 ++++++++++------- app.py | 5 +++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index b09fb54..1b589d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,15 @@ # libexec is missing from >=3.17 # Stage 1 - bundle base image + runtime -FROM python:3.11-alpine3.16 AS python-alpine +FROM python:3.12-alpine3.19 AS python-alpine +ARG ALPINE="v3.19" # Install GCC (Alpine uses musl but we compile and link dependencies with GCC) -RUN apk upgrade -U --available --no-cache && \ - apk add --no-cache \ +RUN echo "@kubezero https://cdn.zero-downtime.net/alpine/${ALPINE}/kubezero" >> /etc/apk/repositories && \ + wget -q -O /etc/apk/keys/stefan@zero-downtime.net-61bb6bfb.rsa.pub https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub + +RUN apk -U --no-cache upgrade && \ + apk --no-cache add \ libstdc++ @@ -15,8 +19,7 @@ FROM python-alpine AS build-image ARG TAG="latest" # Install aws-lambda-cpp build dependencies -RUN apk upgrade -U --available --no-cache && \ - apk add --no-cache \ +RUN apk --no-cache add \ build-base \ libtool \ autoconf \ @@ -25,8 +28,8 @@ RUN apk upgrade -U --available --no-cache && \ cmake \ libcurl \ libffi-dev \ - libexecinfo-dev \ - openssl-dev + openssl-dev \ + libexecinfo-dev@kubezero # cargo # Install requirements diff --git a/app.py b/app.py index 2ca14b5..9bcc18d 100644 --- a/app.py +++ b/app.py @@ -261,6 +261,11 @@ def handler(event, context): title = "ElastiCache fail over complete" body = "for node {}".format(msg["ElastiCache:FailoverComplete"]) + # ElasticCache update notifications + elif "ElastiCache:ServiceUpdateAvailableForNode" in msg: + title = "ElastiCache update available" + body = "for node {}".format(msg["ElastiCache:ServiceUpdateAvailableForNode"]) + # known RDS events elif "Event Source" in msg and msg['Event Source'] in ["db-instance", "db-cluster-snapshot", "db-snapshot"]: try: