From 1a7c813d7dc47d332807f56346a143de615e4994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 14 Jun 2024 16:22:59 +0200 Subject: [PATCH] feat: introduce a patch for the Docker base layer This patch allows the customisation of the mfe base layer. Without it, we have to apply changes to the "mfe-dockerfile-pre-npm-install" patch, and that means re-apply changes for every single MFE. --- README.rst | 7 +++++++ .../20240614_162207_regis_patch_dockerfile_common.md | 1 + tutormfe/templates/mfe/build/mfe/Dockerfile | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 changelog.d/20240614_162207_regis_patch_dockerfile_common.md diff --git a/README.rst b/README.rst index 0a1a9c51..240950ee 100644 --- a/README.rst +++ b/README.rst @@ -438,6 +438,13 @@ Add any configurations at the end of the development webpack config file in Java File changed: ``tutormfe/templates/mfe/apps/mfe/webpack.dev-tutor.config.js`` +mfe-dockerfile-base +~~~~~~~~~~~~~~~~~~~ + +Add Dockerfile instructions that will be applied to the base layer of the "mfe" image. This base layer is used both in production and development, for all applications. + +File changed: ``tutormfe/templates/mfe/build/mfe/Dockerfile`` + mfe-dockerfile-pre-npm-install ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/changelog.d/20240614_162207_regis_patch_dockerfile_common.md b/changelog.d/20240614_162207_regis_patch_dockerfile_common.md new file mode 100644 index 00000000..7d05ada8 --- /dev/null +++ b/changelog.d/20240614_162207_regis_patch_dockerfile_common.md @@ -0,0 +1 @@ +- [Feature] Introduce a "mfe-dockerfile-base" patch to customise the base layer of the "mfe" Docker image. (by @regisb) diff --git a/tutormfe/templates/mfe/build/mfe/Dockerfile b/tutormfe/templates/mfe/build/mfe/Dockerfile index 17b5b62d..ad89839c 100644 --- a/tutormfe/templates/mfe/build/mfe/Dockerfile +++ b/tutormfe/templates/mfe/build/mfe/Dockerfile @@ -20,6 +20,8 @@ RUN mkdir -p /openedx/app /openedx/env WORKDIR /openedx/app ENV PATH=/openedx/app/node_modules/.bin:${PATH} +{{ patch("mfe-dockerfile-base") }} + {% for app_name, app in iter_mfes() %} ####################### {{ app_name }} MFE ######## {{ app_name }} (git)