From 2e57f55f1ac25ad244f84ad29952ccaa1b228faf Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 27 Jul 2020 14:17:47 +0200 Subject: [PATCH] Build image in multiple flavors Signed-off-by: Knut Ahlers --- .gitignore | 2 ++ Dockerfile | 2 +- Makefile | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b17187 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +Dockerfile.build +korvike diff --git a/Dockerfile b/Dockerfile index fb14800..c3ec606 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:stretch +FROM node:{{ .ver }} LABEL maintainer Knut Ahlers diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..12992a5 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +KORVIKE_VERSION:=v0.7.1 + +jenkins: build_latest +jenkins: build_14 +jenkins: build_12 +jenkins: build_10 + +build_%: korvike + ./korvike \ + -i Dockerfile \ + -o Dockerfile.build \ + -v ver=$* + docker build \ + -t reporunner/debian-node:$* \ + -f Dockerfile.build . + docker push \ + reporunner/debian-node:$* + +korvike: + curl -sSfL "https://github.com/Luzifer/korvike/releases/download/$(KORVIKE_VERSION)/korvike_linux_amd64.tar.gz" | tar -xz + mv korvike_linux_amd64 korvike