srt2vtt / Dockerfile
ChandimaPrabath's picture
Create Dockerfile
3485fdf verified
raw
history blame contribute delete
579 Bytes
# Stage 1: Clone & install
FROM node:20-alpine AS builder
# Install git for cloning
RUN apk add --no-cache git
WORKDIR /app
# Clone only the latest commit (shallow) and remove .git to keep it small
RUN git clone --depth 1 https://github.com/theonlymo/SRTtoVTT.git . \
&& rm -rf .git
# Install production dependencies
RUN npm ci --only=production
# Stage 2: Runtime
FROM node:20-alpine
WORKDIR /app
# Copy over installed deps and app code from builder
COPY --from=builder /app /app
# Expose the port the app listens on
EXPOSE 5000
# Start the server
CMD ["npm", "start"]