Skip to content

Commit 045b0b9

Browse files
committed
Add a two-stages Dockerfile for building Riot
1 parent 10671aa commit 045b0b9

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Builder
2+
FROM node:alpine as builder
3+
4+
COPY . /src
5+
6+
WORKDIR /src
7+
8+
RUN apk add --no-cache git \
9+
&& npm install \
10+
&& npm run build
11+
12+
13+
# App
14+
FROM nginx:latest
15+
16+
COPY --from=builder /src/webapp /app
17+
COPY config.sample.json /app/config.json
18+
19+
RUN rm -rf /usr/share/nginx/html \
20+
&& ln -s /app /usr/share/nginx/html

0 commit comments

Comments
 (0)