From acecc17482eb928b77d3deefabddda2048f2cbf5 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 | 8 ++++++-- README.md | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 624eb5e02..cdff05141 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +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.0" -RUN npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.3.2" +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 d006c86fc..e7bb1eee0 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,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