From dcbce403ce96404b2cbe943c1444d8a6b464cf4b Mon Sep 17 00:00:00 2001 From: busma13 Date: Thu, 6 Feb 2025 13:04:05 -0700 Subject: [PATCH] get image version and kafka connector version from build args --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8173ebc..599ac10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ -ARG NODE_VERSION +ARG NODE_VERSION=22.13.1 FROM node:${NODE_VERSION}-alpine ARG GITHUB_SHA ARG BUILD_TIMESTAMP +ARG TERAFOUNDATION_KAFKA_CONNECTOR_VERSION +ARG IMAGE_VERSION RUN apk --no-cache add \ bash \ @@ -55,7 +57,7 @@ RUN npm init --yes &> /dev/null \ --build \ --no-package-lock \ --no-optional \ - 'terafoundation_kafka_connector@~1.2.1' \ + terafoundation_kafka_connector@~$TERAFOUNDATION_KAFKA_CONNECTOR_VERSION \ && npm cache clean --force RUN apk del .build-deps @@ -77,8 +79,9 @@ LABEL org.opencontainers.image.created="$BUILD_TIMESTAMP" \ org.opencontainers.image.source="https://github.com/terascope/base-docker-image" \ org.opencontainers.image.title="Node-base" \ org.opencontainers.image.vendor="Terascope" \ + org.opencontainers.image.version="$IMAGE_VERSION" \ io.terascope.image.node_version="$NODE_VERSION" \ - io.terascope.image.kafka_connector_version="1.2.1" + io.terascope.image.kafka_connector_version="$TERAFOUNDATION_KAFKA_CONNECTOR_VERSION" # Use tini to handle sigterm and zombie processes ENTRYPOINT ["/sbin/tini", "--"]