Skip to content

Commit

Permalink
Fix: Replace external CDN references with local files for Material De…
Browse files Browse the repository at this point in the history
…sign Lite (#1558)
  • Loading branch information
Ganiredi authored Dec 2, 2024
1 parent c601046 commit 6d10b95
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
14 changes: 8 additions & 6 deletions projects/kubernetes/test-infra/docker/linux/deck/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ARG BASE_IMAGE #gcr.io/k8s-prow/deck:v20200924-369a496323

ARG BASE_IMAGE
FROM $BASE_IMAGE

RUN find /template -type f -iname '*.html' -exec sed -i -e 's,https://code.getmdl.io/1.3.0/,/static/,g' {} \;
RUN find /lenses/podinfo -type f -iname '*.html' -exec sed -i -e 's,https://code.getmdl.io/1.3.0/,/static/,g' {} \;
# Copy local files instead of downloading using external CDN
COPY static/material/1.3.0/material.min.js /static/material/1.3.0/
COPY static/material/1.3.0/material.indigo-pink.min.css /static/material/1.3.0/


RUN wget https://code.getmdl.io/1.3.0/material.min.js -P /static
RUN wget https://code.getmdl.io/1.3.0/material.indigo-pink.min.css -P /static
# Update HTML references
RUN find /template -type f -iname '*.html' -exec sed -i -e 's,https://code.getmdl.io/1.3.0/,/static/material/1.3.0/,g' {} \;
RUN find /lenses/podinfo -type f -iname '*.html' -exec sed -i -e 's,https://code.getmdl.io/1.3.0/,/static/material/1.3.0/,g' {} \;

Large diffs are not rendered by default.

Loading

0 comments on commit 6d10b95

Please sign in to comment.