Files
MIKROTIK-RMM/backend/Dockerfile
T
dependabot[bot] bb7e227be2 chore(deps): bump node from 20-alpine to 26-alpine in /backend
Bumps node from 20-alpine to 26-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 17:25:10 +00:00

41 lines
885 B
Docker

# Stage 1: Build
FROM node:26-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Stage 2: Production
FROM node:26-alpine AS production
WORKDIR /app
# Install only production dependencies
COPY package*.json ./
RUN npm install --omit=dev && npm cache clean --force
# Install arp-scan for server-side MAC→IP ARP discovery.
# libcap is needed to set file capabilities so it runs without root.
# openssl is needed for self-signed certificate generation.
RUN apk add --no-cache arp-scan libcap openssl \
&& setcap cap_net_raw+ep /usr/bin/arp-scan
# Copy built files
COPY --from=builder /app/dist ./dist
# Create backups directory
RUN mkdir -p /app/backups
# Create non-root user
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
RUN chown -R appuser:appgroup /app
USER appuser
EXPOSE 3001
CMD ["node", "dist/index.js"]