Add Dockerfile
Change-Id: I6f60fae65f03740f26d94d9a3cc2fa2402511ca9
This commit is contained in:
parent
032b2e0015
commit
b20a049a64
11
.dockerignore
Normal file
11
.dockerignore
Normal file
@ -0,0 +1,11 @@
|
||||
# Exclude a bunch of stuff which can make the build context a larger than it needs to be
|
||||
.git/
|
||||
tests/
|
||||
build/
|
||||
lib/
|
||||
node_modules/
|
||||
electron_app/
|
||||
karma-reports/
|
||||
.idea/
|
||||
.tmp/
|
||||
config.json*
|
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# Builder
|
||||
FROM node:10-alpine as builder
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . /src
|
||||
RUN yarn --network-timeout=100000 install
|
||||
RUN yarn build
|
||||
|
||||
# Copy the config now so that we don't create another layer in the app image
|
||||
#RUN cp /src/config.sample.json /src/webapp/config.json
|
||||
|
||||
|
||||
# App
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /src/build /app
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html \
|
||||
&& ln -s /app /usr/share/nginx/html
|
Loading…
Reference in New Issue
Block a user