-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
40 lines (26 loc) · 1012 Bytes
/
Dockerfile
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
36
37
38
39
40
# Copyright 2024 Hathor Labs
# This software is provided ‘as-is’, without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
# This software cannot be redistributed unless explicitly agreed in writing with the authors.
# Build phase
FROM node:20-alpine AS builder
WORKDIR /app
RUN apk update && apk add python3 g++ make py3-setuptools
COPY . .
RUN corepack enable
# Use the same version as flake's
RUN yarn set version 4.1.0
# This will install dependencies for all packages, except for the lambdas since
# they are ignored in .dockerignore
RUN yarn install
RUN yarn workspace sync-daemon run build
# This will remove all dev dependencies and install production deps only
RUN yarn workspaces focus -A --production
# Run phase
FROM node:20-alpine AS runner
WORKDIR /app
# Copy only the necessary files from the build phase
COPY --from=builder /app .
WORKDIR /app/packages/daemon/
CMD ["node", "dist/index.js"]