-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
38 lines (32 loc) · 1.32 KB
/
Copy pathDockerfile.dev
File metadata and controls
38 lines (32 loc) · 1.32 KB
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
# Development container for documentdb-agentic-memory.
#
# Purpose: run `npm install`, `npm run build`, `npm test`, etc. without
# installing Node.js or build toolchain on the host machine.
#
# Usage (via compose.dev.yml):
# docker compose -f compose.dev.yml run --rm dev npm install
# docker compose -f compose.dev.yml run --rm dev npm run build
# docker compose -f compose.dev.yml run --rm dev npm test
FROM node:20-bookworm-slim
# `better-sqlite3` is a native module and needs a C++ toolchain at install time.
# python3 / make / g++ cover that. `git` is handy for `npm` packages that pull
# from VCS, and `ca-certificates` lets npm reach the registry over TLS.
# `libcurl4` is needed by the `mongod` binary that mongodb-memory-server
# downloads for the integration tests; the slim base image omits it.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
make \
g++ \
git \
ca-certificates \
libcurl4 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# The base image already provides a non-root `node` user at uid 1000.
# Pre-create the node_modules mountpoint owned by `node` so a fresh named
# volume inherits those permissions on first creation.
RUN mkdir -p /workspace/node_modules \
&& chown -R node:node /workspace
USER node
CMD ["bash"]