-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (26 loc) · 907 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
27
28
# Creates the Test-bed-time-service, including a simple GUI / Wall clock
#
# You can access the container using:
# docker run -it test-bed-time-service sh
# To start it stand-alone:
# docker run -it -p 8100:8100 test-bed-time-service
FROM node:alpine AS builder
RUN mkdir -p /src
COPY . /src/
WORKDIR /src/packages/server
RUN npm i && \
npm run build
WORKDIR /src/packages/gui
RUN npm i && \
npm run build
FROM node:alpine
RUN mkdir -p /app
COPY --from=builder /src/packages/server/package.json /app/package.json
COPY --from=builder /src/packages/server/LICENSE /app/LICENSE
COPY --from=builder /src/packages/server/dist /app/dist
COPY --from=builder /src/packages/server/public /app/public
COPY --from=builder /src/packages/server/schemas /app/schemas
# COPY --from=builder /src/packages/server/node_modules /app/node_modules
WORKDIR /app
RUN npm i --only=prod
CMD ["node", "./dist/index.js"]