From 2d983000cda528914cbfe06864339fd9071f67e1 Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Mon, 1 May 2023 09:10:51 +0100 Subject: [PATCH] using subdir --- Dockerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0d8f6b..b576343 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM rust:1.69 AS rust-build RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -COPY . ./ +COPY . /draught +WORKDIR /draught RUN wasm-pack build --release RUN ls @@ -10,12 +11,14 @@ RUN cargo doc --no-deps --document-private-items FROM node:18 AS js-build -COPY . ./ -COPY --from=rust-build /pkg /pkg -WORKDIR /www +COPY . /draught +WORKDIR /draught + +COPY --from=rust-build /draught/pkg /draught/pkg +WORKDIR /draught/www RUN npm ci RUN npm run build --if-present -COPY --from=rust-build /target/doc /www/dist/ +COPY --from=rust-build /draught/target/doc /draught/www/dist/ FROM nginx -COPY --from=js-build /www/dist /usr/share/nginx/html/ \ No newline at end of file +COPY --from=js-build /draught/www/dist /usr/share/nginx/html/ \ No newline at end of file