add dockerfile which builds a cinny container served by nginx
This commit is contained in:
parent
026f835a87
commit
313ff8e184
1 changed files with 21 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
## Builder
|
||||||
|
FROM node:14-alpine as builder
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
COPY . /src
|
||||||
|
RUN npm install \
|
||||||
|
&& npm run build
|
||||||
|
|
||||||
|
|
||||||
|
## App
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY --from=builder /src/dist /app
|
||||||
|
COPY --from=builder /src/olm.wasm /app/olm.wasm
|
||||||
|
|
||||||
|
# Insert wasm type into Nginx mime.types file so they load correctly.
|
||||||
|
RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types
|
||||||
|
|
||||||
|
RUN rm -rf /usr/share/nginx/html \
|
||||||
|
&& ln -s /app /usr/share/nginx/html
|
Loading…
Reference in a new issue