Sửa lỗi tạo docker

This commit is contained in:
2026-06-12 07:59:10 +07:00
parent d7556aa087
commit 377c4d41d8
13 changed files with 342 additions and 26 deletions
+22
View File
@@ -0,0 +1,22 @@
FROM node:18-slim
# Cài đặt các công cụ biên dịch và thư viện cần thiết cho các module native (sharp, bcrypt)
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
libvips-dev \
perl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package*.json ./
RUN npm install --omit=dev
COPY . .
EXPOSE 3000
ENV NODE_ENV=production
CMD ["node", "backend/server.js"]