-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
26 lines (18 loc) · 726 Bytes
/
Dockerfile
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
FROM node:19-bullseye-slim
# Add some information about the image
LABEL maintainer="Göran Sander mountaindude@ptarmiganlabs.com"
LABEL description="Cache warming tool 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 .
RUN npm install
# 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", "docker-healthcheck.js"]
CMD ["node", "index.js"]