File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
FROM node:18 as frontend
2
2
3
- COPY ./site ./site
3
+ COPY ./site/frontend ./site/frontend
4
4
RUN cd site/frontend && npm ci
5
5
RUN cd site/frontend && npm run check
6
6
RUN cd site/frontend && npm run build
7
7
8
- FROM ubuntu:20.04 as build
8
+ FROM ubuntu:20.04 as base
9
+
10
+ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
9
11
10
12
RUN apt-get update -y && \
11
13
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
@@ -23,6 +25,17 @@ RUN apt-get update -y && \
23
25
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
24
26
--default-toolchain stable --profile minimal -y
25
27
28
+ RUN bash -c 'source $HOME/.cargo/env && cargo install cargo-chef'
29
+
30
+ FROM base AS planner
31
+ COPY . .
32
+ RUN bash -c 'source $HOME/.cargo/env && cargo chef prepare --recipe-path recipe.json'
33
+
34
+ FROM base as build
35
+ COPY --from=planner recipe.json recipe.json
36
+
37
+ RUN bash -c 'source $HOME/.cargo/env && cargo chef cook --release --recipe-path recipe.json'
38
+
26
39
COPY ./Cargo.lock ./Cargo.lock
27
40
COPY ./Cargo.toml ./Cargo.toml
28
41
COPY ./collector ./collector
You can’t perform that action at this time.
0 commit comments