forked from cirruslabs/cirrus-ci-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 707 Bytes
/
Dockerfile
File metadata and controls
29 lines (20 loc) · 707 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
FROM node:current as builder
WORKDIR /tmp/cirrus-ci-web
# add dependency data files
ADD package.json yarn.lock .yarnrc.yml /tmp/cirrus-ci-web/
# add relevant files from .yarn
ADD .yarn /tmp/cirrus-ci-web/.yarn
RUN yarn
ENV NODE_ENV=production
ENV NODE_OPTIONS=--openssl-legacy-provider
ADD . /tmp/cirrus-ci-web/
RUN yarn bootstrap && yarn build && rm -rf build/service-worker.js
FROM node:current-alpine
WORKDIR /svc/cirrus-ci-web
EXPOSE 8080
COPY --from=builder /tmp/cirrus-ci-web/serve.json /svc/cirrus-ci-web/serve.json
COPY --from=builder /tmp/cirrus-ci-web/build/ /svc/cirrus-ci-web/
RUN npm install -g serve@13.0.2
CMD serve --single \
--listen 8080 \
--config serve.json