Skip to content

Commit cda2d95

Browse files
committed
change vite/tailwind in dockerfile to make sure optimised container works
1 parent 8971b33 commit cda2d95

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/recipes/build/docker-image.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ COPY package.json package-lock.json ./
122122
RUN npm install
123123
COPY src/Shared src/Shared
124124
COPY src/Client src/Client
125-
RUN dotnet fable src/Client --run npx vite build
126-
125+
# tailwind.config.js needs to be in the dir where the
126+
# vite build command is run from otherwise styles will
127+
# be missing from the bundle
128+
COPY src/Client/tailwind.config.js .
129+
RUN dotnet fable src/Client --run npx vite build src/Client
127130
128131
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
129132
COPY --from=server-build /workspace/deploy /app

0 commit comments

Comments
 (0)