-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.runtime
More file actions
38 lines (31 loc) · 973 Bytes
/
Copy pathDockerfile.runtime
File metadata and controls
38 lines (31 loc) · 973 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
36
37
38
# syntax=docker/dockerfile:1.7
ARG NODE_IMAGE=node:22-bookworm-slim
ARG RUNTIME_ROOT=/opt/spawnfile/runtime-installs/daimon
FROM ${NODE_IMAGE} AS build
ARG DAIMON_VERSION=0.1.1
ARG MNEME_VERSION=0.1.0
ARG PI_VERSION=0.79.10
ARG RUNTIME_ROOT
RUN mkdir -p "${RUNTIME_ROOT}" \
&& cd "${RUNTIME_ROOT}" \
&& npm install --omit=dev --no-fund --no-audit \
"@noopolis/daimon@${DAIMON_VERSION}" \
"@noopolis/mneme@${MNEME_VERSION}" \
"@earendil-works/pi-coding-agent@${PI_VERSION}" \
"@earendil-works/pi-ai@${PI_VERSION}" \
&& npm cache clean --force \
&& find node_modules -type d \( \
-name docs -o \
-name examples -o \
-name test -o \
-name tests -o \
-name __tests__ \
\) -prune -exec rm -rf {} + \
&& find node_modules -type f \( \
-name "*.map" -o \
-name "*.md" -o \
-name "*.mdx" \
\) -delete
FROM scratch AS runtime
ARG RUNTIME_ROOT
COPY --from=build ${RUNTIME_ROOT} ${RUNTIME_ROOT}