-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 896 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (28 loc) · 896 Bytes
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
# Stage 1: Build Java Runner
FROM openjdk:21 AS java-builder
WORKDIR /app
COPY . .
WORKDIR /app/java-runner
RUN chmod +x build.sh && bash build.sh
# Stage 2: Final Runtime
FROM openjdk:21-slim
# Install Node.js 20
RUN apt-get update && apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy package files and install dependencies
COPY package.json package-lock.json ./
RUN npm install
# Build Cache Bust (Hotfix v7.0)
ENV BUILD_ID=20260324-0815
# Copy all project files
COPY . .
# Copy compiled classes and libraries from java-builder
COPY --from=java-builder /app/java-runner/build /app/java-runner/build
COPY --from=java-builder /app/java-runner/libs /app/java-runner/libs
# Expose Hugging Face Port
EXPOSE 7860
# Start scanning engine
CMD ["npm", "start"]