mirror of
https://github.com/ptarmiganlabs/butler-sos.git
synced 2025-12-19 09:47:53 -05:00
28 lines
798 B
Docker
Executable File
28 lines
798 B
Docker
Executable File
# Build Docker image for Amd64
|
|
FROM node:22-bullseye-slim
|
|
|
|
# Add metadata about the image
|
|
LABEL maintainer="Göran Sander mountaindude@ptarmiganlabs.com"
|
|
LABEL description="Real-time operational metrics for Qlik Sense Enterprise on Windows."
|
|
|
|
# Create app dir inside container
|
|
WORKDIR /nodeapp
|
|
|
|
# Install app dependencies separately (creating a separate layer for node_modules, effectively caching them between image rebuilds)
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --omit=dev
|
|
|
|
# Copy app's source files
|
|
COPY . .
|
|
|
|
# Create and use non-root user
|
|
RUN groupadd -r nodejs \
|
|
&& useradd -m -r -g nodejs nodejs
|
|
|
|
USER nodejs
|
|
|
|
# Set up Docker healthcheck
|
|
HEALTHCHECK --interval=12s --timeout=12s --start-period=30s CMD ["node", "src/docker-healthcheck.js"]
|
|
|
|
CMD ["node", "src/butler-sos.js"]
|