Skip to content

Commit 45e31c7

Browse files
author
Lasim
committed
refactor(satellite): simplify Dockerfile for development environment
1 parent c292d86 commit 45e31c7

File tree

1 file changed

+8
-44
lines changed

1 file changed

+8
-44
lines changed

services/satellite/Dockerfile

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,16 @@
1-
# Production image - Debian base required for nsjail
1+
# Development/Team-Only image - simplified without nsjail
2+
# For production multi-tenant deployment, see docs for nsjail setup
23
FROM node:24-bookworm-slim
34

4-
# Create deploystack user with home directory (simulating production setup)
5+
# Create deploystack user with home directory
56
RUN useradd -m -d /opt/deploystack -s /bin/bash deploystack
67

7-
# Install build dependencies and runtime dependencies for nsjail
8+
# Install only essential runtime dependencies
89
RUN apt-get update && \
910
apt-get install -y --no-install-recommends \
10-
autoconf \
11-
bison \
12-
flex \
13-
gcc \
14-
g++ \
15-
git \
16-
libprotobuf-dev \
17-
libnl-route-3-dev \
18-
libtool \
19-
make \
20-
pkg-config \
21-
protobuf-compiler \
2211
ca-certificates \
2312
&& rm -rf /var/lib/apt/lists/*
2413

25-
# Build nsjail from source
26-
RUN git clone --depth 1 https://github.com/google/nsjail.git /tmp/nsjail && \
27-
cd /tmp/nsjail && \
28-
make && \
29-
cp nsjail /usr/local/bin/ && \
30-
chmod +x /usr/local/bin/nsjail && \
31-
cd / && \
32-
rm -rf /tmp/nsjail
33-
34-
# Clean up build dependencies to reduce image size
35-
# Note: For nsjail to work with unprivileged user namespaces, the HOST system must have:
36-
# kernel.unprivileged_userns_clone=1
37-
# This cannot be set from inside the container. See README for deployment instructions.
38-
RUN apt-get remove -y \
39-
autoconf \
40-
bison \
41-
flex \
42-
gcc \
43-
g++ \
44-
git \
45-
libtool \
46-
make \
47-
pkg-config && \
48-
apt-get autoremove -y && \
49-
rm -rf /var/lib/apt/lists/*
50-
5114
# Create mcp-cache base directory with proper ownership
5215
RUN mkdir -p /opt/deploystack/mcp-cache && \
5316
chown -R deploystack:deploystack /opt/deploystack
@@ -63,14 +26,15 @@ RUN npm install --omit=dev --no-package-lock
6326
# Copy pre-built files
6427
COPY services/satellite/dist ./dist
6528

66-
# Create a default .env file with production defaults
67-
RUN echo "NODE_ENV=production" > .env && \
29+
# Create a default .env file with development defaults
30+
# NODE_ENV=development ensures no nsjail isolation is used
31+
RUN echo "NODE_ENV=development" > .env && \
6832
echo "PORT=3001" >> .env && \
6933
echo "LOG_LEVEL=info" >> .env
7034

7135
EXPOSE 3001
7236

73-
# Run as deploystack user (simulating production setup)
37+
# Run as deploystack user
7438
USER deploystack
7539

7640
CMD ["node", "--env-file=.env", "dist/index.js"]

0 commit comments

Comments
 (0)