-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (24 loc) · 787 Bytes
/
Dockerfile
File metadata and controls
35 lines (24 loc) · 787 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
29
30
31
32
33
34
35
# Note: This Dockerfile is optimized for iterating, not for production.
# For production we can do a lot more to optimize the image size
FROM node:20 AS builder
RUN mkdir /app
RUN npm install -g typescript
WORKDIR /app
COPY package.json .
COPY yarn.lock .
RUN yarn install --frozen-lockfile --ignore-scripts
COPY . .
RUN yarn build
RUN npm prune --omit=dev
COPY dev/prod.config.json /app/dist/config.json
FROM node:20-slim
WORKDIR /app
RUN apt update
# LSPs
RUN npm install -g typescript && npm install -g typescript-language-server
RUN apt install -y python3-pylsp
COPY --from=builder /app/dist /app
COPY --from=builder /app/node_modules /app/node_modules
# Cleanup
RUN apt clean && rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["node", "index.js", "--config", "/app/config.json"]