-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (37 loc) · 1.37 KB
/
Dockerfile
File metadata and controls
44 lines (37 loc) · 1.37 KB
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
37
38
39
40
41
42
43
44
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Single-stage runtime image
FROM node:24-trixie-slim
ENV NODE_ENV=production
ENV PATH=/usr/local/bin:${PATH}
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl ffmpeg libstdc++6 \
libpng16-16 libxml2 zlib1g \
&& rm -rf /var/lib/apt/lists/*
# Download and install dcmnorm from GitHub releases
RUN curl -fsSL "https://github.com/pohcee/dcmnorm/releases/latest/download/dcmnorm-linux-x86_64.tar.gz" \
| tar -xz -C /usr/local/bin dcmnorm \
&& chmod 755 /usr/local/bin/dcmnorm
# Install npm dependencies
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci --omit=dev
# Copy application code
COPY src ./src
COPY helpers ./helpers
# Set up permissions
RUN chown -R node /usr/src/app
USER node
CMD ["node", "src/index.js", "service"]