-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (24 loc) · 740 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (24 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Build stage
FROM node:18 AS builder
WORKDIR /app
COPY . .
RUN npm install -g pnpm@latest
RUN pnpm install
# Raise Node's heap ceiling for the Nitro build — default ~2GB OOMs on
# this repo's data-file-heavy build. 4GB gives headroom on modest hosts.
RUN NODE_OPTIONS=--max-old-space-size=4096 pnpm build
COPY *.txt .output/
COPY *.xml .output/
# Runtime stage
FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app/.output .
EXPOSE 3000
CMD ["node", "server/index.mjs"]
# Usage:
# docker build -t nlptoolkit .
# docker run -p 3000:3000 nlptoolkit
# docker save -o nlptoolkit.tar nlptoolkit
# # Install git
# RUN apt-get update && apt-get install -y git
# #RUN git clone https://github.com/gokhanercan/nlptoolkit /app