-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 989 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (26 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node:22-alpine AS base
LABEL org.opencontainers.image.source="https://github.com/428lab/lipsync-investigation" \
org.opencontainers.image.description="Lipsync repository investigation tool" \
org.opencontainers.image.licenses="MIT"
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY tsconfig.json ./
# Install all dependencies (including dev dependencies for build) with reproducible clean install
RUN npm ci --no-audit --no-fund
# Copy source code
COPY src/ ./src/
# Build the application
RUN npm run build
############################################
# Final stage (still single-stage for simplicity)
############################################
# Remove dev dependencies to reduce image size
RUN npm prune --production
# Create runtime directories (mounted at runtime) and adjust ownership
RUN mkdir -p /app/input /app/output \
&& chown -R node:node /app
# Switch to non-root user for security best practices
USER node
# Default command
CMD ["npm", "start"]