From 8e8d7c4006d762ebee86e3662b3c82a7d802fb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Moitti=C3=A9?= Date: Thu, 27 Jun 2024 16:17:32 +0200 Subject: [PATCH] Improve dockerfile --- Dockerfile | 9 ++++++--- README.md | 2 +- changelog.md | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f931b4cb3..cdff05141 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,10 +14,13 @@ RUN npm install # Build stage FROM develop-stage as build-stage ARG proxy_url +ARG TERRATOR_PLUGIN_VERSION +ARG GITHUBATOR_PLUGIN_VERSION +ARG KUBERNATOR_PLUGIN_VERSION WORKDIR /app -RUN npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.8.1" -RUN npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.3.3" -RUN npm run plugin:install -- repository-name="kubernator-plugin" repository-url="https://github.com/ditrit/kubernator-plugin.git#0.1.0" +RUN npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#${TERRATOR_PLUGIN_VERSION}" +RUN npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#${GITHUBATOR_PLUGIN_VERSION}" +RUN npm run plugin:install -- repository-name="kubernator-plugin" repository-url="https://github.com/ditrit/kubernator-plugin.git#${KUBERNATOR_PLUGIN_VERSION}" RUN npm run plugin:init RUN npm run build diff --git a/README.md b/README.md index a2622fbe8..4743873c8 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ It will generate the built application in the `dist` folder. To build this app with docker (the two main plugins for terraform & github are included), please use this command: ```bash -docker build . -t leto-modelizer +docker build . -build-arg TERRATOR_PLUGIN_VERSION="0.8.1" -build-arg GITHUBATOR_PLUGIN_VERSION="0.3.3" -build-arg KUBERNATOR_PLUGIN_VERSION="0.1.0" -t leto-modelizer ``` ### Docker run diff --git a/changelog.md b/changelog.md index a3cdc3d10..fb6feaa01 100644 --- a/changelog.md +++ b/changelog.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * `CF_createProject`: allows or prevents user to create a project. * Add settings button/menu to homepage and update its content. * Add route to clear token. +* Improve dockerfile with version of plugins as argument. ### Changed