how tf does docker even work

This commit is contained in:
lklynet
2026-01-01 22:51:35 -05:00
parent 4578250692
commit 739ef36f73
+8 -4
View File
@@ -1,14 +1,18 @@
FROM node:18-alpine
FROM node:18-slim
WORKDIR /app
# Install build dependencies
RUN apk add --no-cache python3 make g++ linux-headers
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
COPY package*.json ./
# Install dependencies and rebuild native modules
RUN npm install --production && npm rebuild
# Install dependencies
RUN npm install --production
COPY server.js ./