File tree 2 files changed +51
-1
lines changed
2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 1
1
# FROM node:23-slim AS base
2
2
FROM arm64v8/node:23-bookworm-slim AS base
3
+ # Update default packages
4
+ RUN apt-get update
5
+
6
+ # Get Ubuntu packages
7
+ RUN apt-get install -y \
8
+ build-essential \
9
+ curl
10
+
11
+ # Update new packages
12
+ RUN apt-get update
13
+
14
+ # Get Rust
15
+ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
16
+
17
+ RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
18
+
3
19
RUN corepack enable
4
20
COPY . /node_modules/fastembed
5
21
WORKDIR /node_modules/fastembed
@@ -9,7 +25,8 @@ RUN yarn install
9
25
10
26
FROM base AS build
11
27
RUN yarn install --frozen-lockfile
12
- RUN yarn run tsc
28
+ RUN yarn run build
29
+ RUN yarn run prepublishOnly
13
30
14
31
FROM base
15
32
COPY --from=prod-deps /node_modules/ /app/node_modules/
Original file line number Diff line number Diff line change
1
+ FROM node:23-bookworm-slim AS base
2
+
3
+ # Update default packages
4
+ RUN apt-get update
5
+
6
+ # Get Ubuntu packages
7
+ RUN apt-get install -y \
8
+ build-essential \
9
+ curl
10
+
11
+ # Update new packages
12
+ RUN apt-get update
13
+
14
+ # Get Rust
15
+ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
16
+
17
+ RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
18
+
19
+ RUN corepack enable
20
+ COPY . /node_modules/fastembed
21
+ WORKDIR /node_modules/fastembed
22
+
23
+ FROM base AS prod-deps
24
+ RUN yarn install
25
+
26
+ FROM base AS build
27
+ RUN yarn install --frozen-lockfile
28
+
29
+ RUN yarn run build
30
+ RUN yarn run prepublishOnly
31
+ FROM base
32
+ COPY --from=prod-deps /node_modules/ /app/node_modules/
33
+ COPY --from=build /node_modules/ /app/node_modules/
You can’t perform that action at this time.
0 commit comments