From f1007a855abd648de48af07c7c4919613726097f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 21 Jun 2024 16:59:34 +0200 Subject: [PATCH] fix: docker build deprecation warnings With the latest Docker upgrade, we got the following warnings during build: FromAsCasing: 'as' and 'FROM' keywords' casing do not match LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format --- changelog.d/20240621_170044_regis.md | 1 + tutormfe/templates/mfe/build/mfe/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelog.d/20240621_170044_regis.md diff --git a/changelog.d/20240621_170044_regis.md b/changelog.d/20240621_170044_regis.md new file mode 100644 index 00000000..d7d2eb72 --- /dev/null +++ b/changelog.d/20240621_170044_regis.md @@ -0,0 +1 @@ +- [Bugfix] Fix legacy warnings during Docker build. (by @regisb) diff --git a/tutormfe/templates/mfe/build/mfe/Dockerfile b/tutormfe/templates/mfe/build/mfe/Dockerfile index fe62ff24..17b5b62d 100644 --- a/tutormfe/templates/mfe/build/mfe/Dockerfile +++ b/tutormfe/templates/mfe/build/mfe/Dockerfile @@ -18,7 +18,7 @@ RUN apt update \ RUN mkdir -p /openedx/app /openedx/env WORKDIR /openedx/app -ENV PATH /openedx/app/node_modules/.bin:${PATH} +ENV PATH=/openedx/app/node_modules/.bin:${PATH} {% for app_name, app in iter_mfes() %} ####################### {{ app_name }} MFE @@ -29,7 +29,7 @@ ADD --keep-git-dir=true {{ app["repository"] }}#{{ app.get("version", MFE_COMMON ######## {{ app_name }} (src) # Empty layer with just the repo at the root, for build-time bind-mounts -FROM scratch as {{ app_name }}-src +FROM scratch AS {{ app_name }}-src COPY --from={{ app_name }}-git /openedx/app / ######## {{ app_name }} (common) @@ -80,7 +80,7 @@ RUN npm run build {% endfor %} ####### final production image with all static assets -FROM {{ MFE_CADDY_DOCKER_IMAGE }} as production +FROM {{ MFE_CADDY_DOCKER_IMAGE }} AS production RUN mkdir -p /openedx/dist