From dcb3decbd3d4e1507aba351f11cd4a148822b06b Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Fri, 14 Jul 2023 13:39:10 +0200 Subject: [PATCH] feat: Rebase sidecar container image --- Dockerfile | 25 ++++++++++++++++++++++--- charts/json-server/values.yaml | 5 +++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c905bd..1c33cc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,27 @@ -FROM node:lts-slim AS build +FROM alpine:latest AS download -RUN npm install -g --omit=optional --omit=dev \ + RUN apk --update add --no-cache \ + curl \ + jq && \ + curl -L https://api.github.com/repos/helm/helm/releases/latest | \ + jq -r '.tag_name' | \ + xargs -I {} curl -L -o /tmp/helm.tar.gz https://get.helm.sh/helm-{}-linux-amd64.tar.gz && \ + tar -xzf /tmp/helm.tar.gz --strip-components=1 -C /tmp + +FROM node:lts-slim + +COPY --from=download /tmp/helm /usr/bin/helm + +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \ + jq \ && + npm install -g --omit=optional --omit=dev \ json-server && \ - npm cache clean --force + npm cache clean --force && \ + rm -rf /var/lib/apt/lists/* COPY init/entrypoint.sh /opt/entrypoint.sh diff --git a/charts/json-server/values.yaml b/charts/json-server/values.yaml index f9b5b31..540659c 100644 --- a/charts/json-server/values.yaml +++ b/charts/json-server/values.yaml @@ -14,9 +14,10 @@ jsonServer: sidecar: image: - repository: alpine/helm + repository: bv11-cr01.bessems.eu/library/json-server pullPolicy: IfNotPresent - tag: 3.12.1 + # Overrides the image tag whose default is the chart appVersion. + tag: {{ image_tag }} replicaCount: 1