From f4f26c647cbebc5230350d7883f6546d0d4c825c Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 20 Jan 2023 09:27:37 +0100 Subject: [PATCH 1/5] Add Vector to the Airflow images --- airflow/CHANGELOG.md | 10 ++++++++++ airflow/Dockerfile | 22 +++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/airflow/CHANGELOG.md b/airflow/CHANGELOG.md index 7b950289c..64fc8c390 100644 --- a/airflow/CHANGELOG.md +++ b/airflow/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [Unreleased] + +### Changed + +- Upgraded to the base image vector:0.26.0-stackable1.0.0. The new base image + provides Vector. The creation of the stackable user and group happens in the + stackable-base layer and is therefore removed from this image ([#291]). + +[#291]: https://github.com/stackabletech/docker-images/pull/291 + ## [airflow-stackable0.5.0] - 2022-11-30 ### Added diff --git a/airflow/Dockerfile b/airflow/Dockerfile index 92ca7db44..718dfa358 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6@sha256:c5ffdf5938d73283cec018f2adf59f0ed9f8c376d93e415a27b16c3c6aad6f45 AS airflow-build-image +FROM docker.stackable.tech/stackable/vector:0.26.0-stackable1.0.0@sha256:4be0d98ca353b3ddb54212ced702504d58995b2b75fbfa07fe001fd992513692 AS airflow-build-image ARG PRODUCT ARG PYTHON @@ -28,7 +28,7 @@ RUN microdnf update \ && pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt FROM prom/statsd-exporter:0.3.0@sha256:a9c27602d6f6b86527657922b6a87c12789f7f9b39a90f1513e8c665c941f26a as statsd-exporter -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6@sha256:e58664de16551db29fb0eaaeb3c4a44eaf95ad89a5b2399a1107041c4f2d6d34 as airflow-main-image +FROM docker.stackable.tech/stackable/vector:0.26.0-stackable1.0.0@sha256:4be0d98ca353b3ddb54212ced702504d58995b2b75fbfa07fe001fd992513692 AS airflow-main-image ARG PRODUCT ARG PYTHON @@ -60,32 +60,24 @@ RUN microdnf install -y yum python${PYTHON} \ ENV HOME=/stackable ENV AIRFLOW_USER_HOME_DIR=/stackable ENV PATH=$PATH:/bin:$HOME/app/bin -ENV AIRFLOW_UID="50000" +ENV AIRFLOW_UID="1000" ENV AIRFLOW_HOME=$HOME/airflow -RUN mkdir -pv ${HOME} && \ - mkdir -pv ${AIRFLOW_HOME} && \ +RUN mkdir -pv ${AIRFLOW_HOME} && \ mkdir -pv ${AIRFLOW_HOME}/dags && \ mkdir -pv ${AIRFLOW_HOME}/logs +RUN chown --recursive stackable:stackable ${AIRFLOW_HOME} + # according to arch, copy binary to the name "tini" RUN curl -o /usr/bin/tini https://repo.stackable.tech/repository/packages/tini/tini-$(arch) COPY airflow/stackable/utils/entrypoint.sh /entrypoint -COPY --from=statsd-exporter /bin/statsd_exporter /stackable/statsd_exporter +COPY --from=statsd-exporter --chown=stackable:stackable /bin/statsd_exporter /stackable/statsd_exporter RUN chmod a+x /entrypoint && \ chmod +x /usr/bin/tini -RUN mkdir -pv ${HOME} && \ - mkdir -pv ${AIRFLOW_HOME} && \ - mkdir -pv ${AIRFLOW_HOME}/dags && \ - mkdir -pv ${AIRFLOW_HOME}/logs - -RUN groupadd -r stackable --gid=1000 && \ - useradd -r -g stackable --uid=${AIRFLOW_UID} -d /stackable stackable && \ - chown -R stackable:stackable /stackable - COPY --from=airflow-build-image --chown=stackable:stackable /stackable/ ${HOME}/ USER stackable From b0d8e338f370b307de298d35bf03185e7121afad Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Thu, 2 Feb 2023 17:01:15 +0100 Subject: [PATCH 2/5] Add inotify-tools to Vector image --- airflow/Dockerfile | 4 ++-- vector/Dockerfile | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/airflow/Dockerfile b/airflow/Dockerfile index 718dfa358..d272e340b 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.stackable.tech/stackable/vector:0.26.0-stackable1.0.0@sha256:4be0d98ca353b3ddb54212ced702504d58995b2b75fbfa07fe001fd992513692 AS airflow-build-image +FROM docker.stackable.tech/sandbox/logging/vector:0.26.0-stackable23.4.0-rc1@sha256:d350ad8da54acec6e285130911762135cbe16cbc307d2ae977e6dd2fc1980d23 AS airflow-build-image ARG PRODUCT ARG PYTHON @@ -28,7 +28,7 @@ RUN microdnf update \ && pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt FROM prom/statsd-exporter:0.3.0@sha256:a9c27602d6f6b86527657922b6a87c12789f7f9b39a90f1513e8c665c941f26a as statsd-exporter -FROM docker.stackable.tech/stackable/vector:0.26.0-stackable1.0.0@sha256:4be0d98ca353b3ddb54212ced702504d58995b2b75fbfa07fe001fd992513692 AS airflow-main-image +FROM docker.stackable.tech/sandbox/logging/vector:0.26.0-stackable23.4.0-rc1@sha256:d350ad8da54acec6e285130911762135cbe16cbc307d2ae977e6dd2fc1980d23 AS airflow-main-image ARG PRODUCT ARG PYTHON diff --git a/vector/Dockerfile b/vector/Dockerfile index e7ac49d15..60df49c47 100644 --- a/vector/Dockerfile +++ b/vector/Dockerfile @@ -23,4 +23,12 @@ RUN microdnf update && \ FROM docker.stackable.tech/stackable/stackable-base:1.0.0-stackable1.0.0@sha256:18a6434eea00c911aaa3dec773e642933bbbfefa953153553998d16b54f349ad +# https://github.com/hadolint/hadolint/wiki/DL4006 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN rpm --install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ + microdnf update && \ + microdnf --assumeyes install inotify-tools && \ + microdnf clean all + COPY --from=builder /build / From db217c9c06175f02918eca142fa3f504181a9782 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Thu, 2 Feb 2023 17:27:36 +0100 Subject: [PATCH 3/5] Update changelog --- vector/CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vector/CHANGELOG.md b/vector/CHANGELOG.md index f1fc7537c..224b09d8e 100644 --- a/vector/CHANGELOG.md +++ b/vector/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased] + +### Added + +- Package inotify-tools added ([#291]). + +[#291]: https://github.com/stackabletech/docker-images/pull/291 + ## [vector-stackable1.0.0] - 2022-12-12 ### Added From 4d55c795116e571700cbea3ea5628ce7ab9e4214 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Thu, 2 Feb 2023 17:56:26 +0100 Subject: [PATCH 4/5] Set the next Vector image tag to 0.26.0-stackable1.1.0 --- airflow/CHANGELOG.md | 2 +- airflow/Dockerfile | 2 +- vector/CHANGELOG.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/airflow/CHANGELOG.md b/airflow/CHANGELOG.md index 64fc8c390..379af6994 100644 --- a/airflow/CHANGELOG.md +++ b/airflow/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Upgraded to the base image vector:0.26.0-stackable1.0.0. The new base image +- Upgraded to the base image vector:0.26.0-stackable1.1.0. The new base image provides Vector. The creation of the stackable user and group happens in the stackable-base layer and is therefore removed from this image ([#291]). diff --git a/airflow/Dockerfile b/airflow/Dockerfile index d272e340b..808ed86f3 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.stackable.tech/sandbox/logging/vector:0.26.0-stackable23.4.0-rc1@sha256:d350ad8da54acec6e285130911762135cbe16cbc307d2ae977e6dd2fc1980d23 AS airflow-build-image +FROM docker.stackable.tech/sandbox/logging/vector:0.26.0-stackable1.1.0@sha256:d350ad8da54acec6e285130911762135cbe16cbc307d2ae977e6dd2fc1980d23 AS airflow-build-image ARG PRODUCT ARG PYTHON diff --git a/vector/CHANGELOG.md b/vector/CHANGELOG.md index 224b09d8e..1795b2355 100644 --- a/vector/CHANGELOG.md +++ b/vector/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [Unreleased] +## [vector-stackable1.1.0] - 2023-02-03 ### Added From ca614c66760e631f844943a2306cb57e3aacdd6b Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 3 Feb 2023 14:55:24 +0100 Subject: [PATCH 5/5] Use docker.stackable.tech/stackable instead of docker.stackable.tech/sandbox/logging in Airflow Dockerfile --- airflow/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/Dockerfile b/airflow/Dockerfile index 808ed86f3..6e50329a5 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.stackable.tech/sandbox/logging/vector:0.26.0-stackable1.1.0@sha256:d350ad8da54acec6e285130911762135cbe16cbc307d2ae977e6dd2fc1980d23 AS airflow-build-image +FROM docker.stackable.tech/stackable/vector:0.26.0-stackable1.1.0@sha256:a0555b112329409669e33ebfb4044b332ade5a8286cf6506e34f2608c66c05d4 AS airflow-build-image ARG PRODUCT ARG PYTHON @@ -28,7 +28,7 @@ RUN microdnf update \ && pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt FROM prom/statsd-exporter:0.3.0@sha256:a9c27602d6f6b86527657922b6a87c12789f7f9b39a90f1513e8c665c941f26a as statsd-exporter -FROM docker.stackable.tech/sandbox/logging/vector:0.26.0-stackable23.4.0-rc1@sha256:d350ad8da54acec6e285130911762135cbe16cbc307d2ae977e6dd2fc1980d23 AS airflow-main-image +FROM docker.stackable.tech/stackable/vector:0.26.0-stackable23.4.0-rc1@sha256:a0555b112329409669e33ebfb4044b332ade5a8286cf6506e34f2608c66c05d4 AS airflow-main-image ARG PRODUCT ARG PYTHON