Files
hypermind/Dockerfile
T
lklynet 7db91bb594 build(docker): optimize docker image size and build process
Use slim base image and install build dependencies only when needed
Rebuild native modules during install for production compatibility
2026-01-01 23:16:42 -05:00

25 lines
415 B
Docker

FROM node:18-bullseye-slim
WORKDIR /app
# Install build dependencies for native modules
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
COPY package*.json ./
# Install dependencies with full rebuild
RUN npm install --production --build-from-source
COPY server.js ./
ENV PORT=3000
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "server.js"]