From cda2d95015ecd183d0cda9ca0e5fe3081094e690 Mon Sep 17 00:00:00 2001 From: Martin Bryant Date: Mon, 18 Dec 2023 11:49:39 +0000 Subject: [PATCH] change vite/tailwind in dockerfile to make sure optimised container works --- docs/recipes/build/docker-image.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/recipes/build/docker-image.md b/docs/recipes/build/docker-image.md index 57d27ef8..f7c494c4 100644 --- a/docs/recipes/build/docker-image.md +++ b/docs/recipes/build/docker-image.md @@ -122,8 +122,11 @@ COPY package.json package-lock.json ./ RUN npm install COPY src/Shared src/Shared COPY src/Client src/Client -RUN dotnet fable src/Client --run npx vite build - +# tailwind.config.js needs to be in the dir where the +# vite build command is run from otherwise styles will +# be missing from the bundle +COPY src/Client/tailwind.config.js . +RUN dotnet fable src/Client --run npx vite build src/Client FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine COPY --from=server-build /workspace/deploy /app