Skip to content

Commit

Permalink
fix: docker build deprecation warnings
Browse files Browse the repository at this point in the history
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
  • Loading branch information
regisb committed Jun 21, 2024
1 parent 2a7d132 commit f1007a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/20240621_170044_regis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Fix legacy warnings during Docker build. (by @regisb)
6 changes: 3 additions & 3 deletions tutormfe/templates/mfe/build/mfe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f1007a8

Please sign in to comment.