clusev/docker/terminal/Dockerfile

20 lines
512 B
Docker

# Clusev terminal sidecar — Node ws↔SSH/PTY bridge.
FROM node:20-bookworm-slim
# node-pty compiles a native addon → needs python3 + a toolchain at install time.
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 make g++ ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json ./
RUN npm install --omit=dev && npm cache clean --force
COPY server.js ./
# Run as the bundled unprivileged node user.
USER node
EXPOSE 3000
CMD ["node", "server.js"]