From d515bad46ff1fc50769a22d8f3109c8d1d36e0ad Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Wed, 15 Jan 2020 12:01:38 +0000 Subject: [PATCH 1/2] Support application/wasm in docker Signed-off-by: Half-Shot --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index a92cdec4b9..b23d999cc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,5 +30,11 @@ FROM nginx:alpine COPY --from=builder /src/webapp /app +# Insert wasm type into Nginx mime.types file so they load correctly. +RUN sed '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types > /tmp/mime.types +RUN cp /tmp/mime.types /etc/nginx/mime.types + +RUN cat /etc/nginx/mime.types + RUN rm -rf /usr/share/nginx/html \ && ln -s /app /usr/share/nginx/html From 625c21a8afbb4870111b9c52c4e98af827024445 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Wed, 15 Jan 2020 17:07:38 +0000 Subject: [PATCH 2/2] @babolivier showed me the way --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b23d999cc7..a180be1074 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,10 +31,7 @@ FROM nginx:alpine COPY --from=builder /src/webapp /app # Insert wasm type into Nginx mime.types file so they load correctly. -RUN sed '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types > /tmp/mime.types -RUN cp /tmp/mime.types /etc/nginx/mime.types - -RUN cat /etc/nginx/mime.types +RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types RUN rm -rf /usr/share/nginx/html \ && ln -s /app /usr/share/nginx/html