Skip to content

Commit 9c0b118

Browse files
authored
Merge pull request #3 from CatalystCode/build-in-docker
Moved UI build step to docker build
2 parents b969e6d + 58dc15c commit 9c0b118

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

ui/.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
*Dockerfile*
3+
*docker-compose*
4+
node_modules
5+
dist

ui/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Build UI in
2+
FROM node:lts
3+
4+
WORKDIR /ui
5+
COPY ./package.json .
6+
COPY ./package-lock.json .
7+
RUN npm install
8+
ADD . .
9+
10+
RUN npm run build
11+
112
# Nginx web server from the official docker registry
213
FROM nginx:1.14.0-alpine
314

@@ -9,4 +20,4 @@ COPY conf /etc/nginx
920
# The static site is built using npm run build
1021
# the output of build is stored in the dist dir
1122
WORKDIR /usr/share/nginx/html
12-
COPY ./dist/ /usr/share/nginx/html
23+
COPY --from=0 /ui/dist /usr/share/nginx/html

0 commit comments

Comments
 (0)