From c624ff3e3586ffd2b3860d882dee8f894dfe5340 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Fri, 7 Feb 2025 06:29:06 +0000 Subject: [PATCH] - Add ARG for MongoDB and Node - Fix ARG for base image label --- Makefile | 2 +- VERSION | 2 +- src/alldev.Dockerfile | 8 +++++--- src/gocd-agent-dood.Dockerfile | 2 ++ src/gocd-agent-golang.Dockerfile | 2 ++ src/gocd-agent-java.Dockerfile | 2 ++ src/gocd-agent-python.Dockerfile | 2 ++ src/gocd-agent.Dockerfile | 6 +++++- src/golang.Dockerfile | 1 + 9 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9eecdf8..754c242 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ help: @echo "${PROJECT} Makefile." @echo "The following commands are available:" @echo "" - @echo " make build DIMG= : Build the specified Docker images" + @echo " make build DIMG= : Build the specified Docker images" @echo " make upload DIMG= : Upload the specified Docker images (only with the right credentials)" @echo " make tag : Tag the Git repository" @echo "" diff --git a/VERSION b/VERSION index 02161ca..e6ba351 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -13.0.0 +13.1.0 diff --git a/src/alldev.Dockerfile b/src/alldev.Dockerfile index efc9ced..ed06474 100644 --- a/src/alldev.Dockerfile +++ b/src/alldev.Dockerfile @@ -12,6 +12,8 @@ ARG FLYWAY_VERSIONS="11.3.1,10.22.0,7.15.0,9.22.3" ARG GO_VERSION="1.23.6" ARG HUGO_VERSION="0.143.1" ARG KOTLIN_VERSION="2.1.10" +ARG MONGODB_VERSION="8.0" +ARG NODE_VERSION="22" ARG NOMAD_VERSION="1.9.5" ARG VENOM_VERSION="v1.2.0" ENV DEBIAN_FRONTEND noninteractive @@ -45,12 +47,12 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio && apt install -y sudo curl locales apt-utils software-properties-common \ && curl -fsSL https://apt.corretto.aws/corretto.key | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg \ && echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | tee /etc/apt/sources.list.d/corretto.list \ -&& curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor \ -&& echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list \ +&& curl -fsSL https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg -o /usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg --dearmor \ +&& echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/${MONGODB_VERSION} main" | sudo tee /etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list \ && apt update \ && locale-gen en_US en_US.UTF-8 \ && dpkg-reconfigure locales \ -&& curl -sL https://deb.nodesource.com/setup_22.x | bash - \ +&& curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \ # install development packages and debugging tools && apt install -y \ alien \ diff --git a/src/gocd-agent-dood.Dockerfile b/src/gocd-agent-dood.Dockerfile index f4f99b0..f349acc 100644 --- a/src/gocd-agent-dood.Dockerfile +++ b/src/gocd-agent-dood.Dockerfile @@ -10,6 +10,8 @@ ARG DEBIAN_VERSION="12" ARG GOCD_VERSION="v25.1.0" FROM gocd/gocd-agent-debian-${DEBIAN_VERSION}:${GOCD_VERSION} +ARG DEBIAN_VERSION +ARG GOCD_VERSION USER root ENV DEBIAN_FRONTEND noninteractive ENV TERM linux diff --git a/src/gocd-agent-golang.Dockerfile b/src/gocd-agent-golang.Dockerfile index 3d049b2..21d6b67 100644 --- a/src/gocd-agent-golang.Dockerfile +++ b/src/gocd-agent-golang.Dockerfile @@ -10,6 +10,8 @@ ARG DEBIAN_VERSION="12" ARG GOCD_VERSION="v25.1.0" FROM gocd/gocd-agent-debian-${DEBIAN_VERSION}:${GOCD_VERSION} +ARG DEBIAN_VERSION +ARG GOCD_VERSION ARG FLYWAY_VERSIONS="11.3.1,10.22.0,7.15.0,9.22.3" ARG GO_VERSION="1.23.6" ARG NOMAD_VERSION="1.9.5" diff --git a/src/gocd-agent-java.Dockerfile b/src/gocd-agent-java.Dockerfile index 65aa0eb..2576944 100644 --- a/src/gocd-agent-java.Dockerfile +++ b/src/gocd-agent-java.Dockerfile @@ -10,6 +10,8 @@ ARG DEBIAN_VERSION="12" ARG GOCD_VERSION="v25.1.0" FROM gocd/gocd-agent-debian-${DEBIAN_VERSION}:${GOCD_VERSION} +ARG DEBIAN_VERSION +ARG GOCD_VERSION ARG NOMAD_VERSION="1.9.5" ARG KOTLIN_VERSION="2.1.10" ARG VENOM_VERSION="v1.2.0" diff --git a/src/gocd-agent-python.Dockerfile b/src/gocd-agent-python.Dockerfile index 015f39e..dd507f4 100644 --- a/src/gocd-agent-python.Dockerfile +++ b/src/gocd-agent-python.Dockerfile @@ -10,6 +10,8 @@ ARG DEBIAN_VERSION="12" ARG GOCD_VERSION="v25.1.0" FROM gocd/gocd-agent-debian-${DEBIAN_VERSION}:${GOCD_VERSION} +ARG DEBIAN_VERSION +ARG GOCD_VERSION USER root ENV DEBIAN_FRONTEND noninteractive ENV TERM linux diff --git a/src/gocd-agent.Dockerfile b/src/gocd-agent.Dockerfile index bd0c0a6..834d536 100644 --- a/src/gocd-agent.Dockerfile +++ b/src/gocd-agent.Dockerfile @@ -10,10 +10,14 @@ ARG DEBIAN_VERSION="12" ARG GOCD_VERSION="v25.1.0" FROM gocd/gocd-agent-debian-${DEBIAN_VERSION}:${GOCD_VERSION} +ARG DEBIAN_VERSION +ARG GOCD_VERSION ARG FLYWAY_VERSIONS="11.3.1,10.22.0,7.15.0,9.22.3" ARG GO_VERSION="1.23.6" ARG HUGO_VERSION="0.143.1" ARG KOTLIN_VERSION="2.1.10" +ARG MONGODB_VERSION="8.0" +ARG NODE_VERSION="22" ARG NOMAD_VERSION="1.9.5" ARG VENOM_VERSION="v1.2.0" LABEL com.tecnick.vendor="Tecnick.com" @@ -44,7 +48,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio && echo " email = gocd@example.com" >> /home/go/.gitconfig \ && echo " name = gocd" >> /home/go/.gitconfig \ # Add repositories and update -&& curl -sL https://deb.nodesource.com/setup_22.x | bash - \ +&& curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \ && apt update && apt -y dist-upgrade \ && apt install -y gnupg apt-utils software-properties-common \ && curl -fsSL https://apt.corretto.aws/corretto.key | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg \ diff --git a/src/golang.Dockerfile b/src/golang.Dockerfile index d6e986d..3ea8565 100644 --- a/src/golang.Dockerfile +++ b/src/golang.Dockerfile @@ -9,6 +9,7 @@ # ------------------------------------------------------------------------------ ARG GO_VERSION="1.23" FROM golang:${GO_VERSION} +ARG GO_VERSION ENV PATH=/root/.local/bin:$PATH ENV USER=root RUN apt update \