-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 826 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (27 loc) · 826 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
# Build stage
FROM node:lts AS build
## Set current working directory
WORKDIR /sparql-benchmark-runner
## Copy all files
COPY bin/ ./bin/
COPY lib/ ./lib/
COPY package.json .
COPY tsconfig.json .
COPY yarn.lock .
## Install and build the lib
RUN yarn install --frozen-lockfile
# Runtime stage
FROM node:lts-alpine
## Set current working directory
WORKDIR /sparql-benchmark-runner
## Copy runtime files from build stage
COPY --from=build /sparql-benchmark-runner/yarn.lock .
COPY --from=build /sparql-benchmark-runner/package.json .
COPY --from=build /sparql-benchmark-runner/bin ./bin
COPY --from=build /sparql-benchmark-runner/lib ./lib
# Install the node module
RUN yarn install --frozen-lockfile --production
# Run base binary
ENTRYPOINT ["node", "./bin/sparql-benchmark-runner"]
# Default command
CMD ["--help"]