mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-22 16:18:14 +08:00
Add a two-stages Dockerfile for building Riot
This commit is contained in:
parent
10671aa06e
commit
045b0b9889
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# Builder
|
||||
FROM node:alpine as builder
|
||||
|
||||
COPY . /src
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
RUN apk add --no-cache git \
|
||||
&& npm install \
|
||||
&& npm run build
|
||||
|
||||
|
||||
# App
|
||||
FROM nginx:latest
|
||||
|
||||
COPY --from=builder /src/webapp /app
|
||||
COPY config.sample.json /app/config.json
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html \
|
||||
&& ln -s /app /usr/share/nginx/html
|
Loading…
Reference in New Issue
Block a user