mirror of
https://github.com/thelegendtubaguy/ArrQueueCleaner.git
synced 2025-12-16 18:14:44 -06:00
Bumps node from 24-alpine to 25-alpine. --- updated-dependencies: - dependency-name: node dependency-version: 25-alpine dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
34 lines
717 B
Docker
34 lines
717 B
Docker
FROM node:25-alpine
|
|
|
|
# Create non-root user
|
|
RUN addgroup -g 1001 -S nodejs && \
|
|
adduser -S appuser -u 1001 -G nodejs
|
|
|
|
RUN npm install -g pnpm
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Copy source and build
|
|
COPY tsconfig.json ./
|
|
COPY src/ ./src/
|
|
RUN pnpm build
|
|
|
|
# Remove dev dependencies and clean up
|
|
RUN pnpm prune --prod && \
|
|
rm -rf src/ tsconfig.json && \
|
|
npm cache clean --force
|
|
|
|
# Change ownership and switch to non-root user
|
|
RUN chown -R appuser:nodejs /app
|
|
USER appuser
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD node -e "console.log('healthy')" || exit 1
|
|
|
|
CMD ["pnpm", "start"]
|