-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 971 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (27 loc) · 971 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
# Stage 1: Build
FROM node:22-slim AS build
WORKDIR /workspace
# Copy specification for proto generation
COPY specification /specification
# Build shared library
COPY implementation/client/client-node /workspace/client-node
WORKDIR /workspace/client-node
RUN npm install && npm run build
# Build side-agent
WORKDIR /workspace/side-agent
COPY implementation/client/side-agent /workspace/side-agent
RUN npm install /workspace/client-node --no-save && npm install && npm run build
# Stage 2: Runtime
FROM node:22-slim
WORKDIR /app
# Copy built library and agent
COPY --from=build /workspace/client-node /app/client-node
COPY --from=build /workspace/side-agent /app/side-agent
WORKDIR /app/side-agent
# Default environment variables
ENV HUB_URL=http://cms:9000
ENV CLIENT_NAME=DockerSideAgent
ENV SELENIUM_REMOTE_URL=http://selenium-hub:4444/wd/hub
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
# Run the compiled JavaScript directly with Node
CMD ["node", "dist/index.js"]