Update Docker build
This commit is contained in:
@@ -22,3 +22,4 @@
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
README.md
|
||||
.DS_Store
|
||||
12
Dockerfile
12
Dockerfile
@@ -2,16 +2,12 @@
|
||||
# Create image to build project
|
||||
FROM node:12-alpine as builder
|
||||
|
||||
# copy the package.json to install dependencies
|
||||
COPY package.json package-lock.json ./
|
||||
WORKDIR /ota-admin-portal
|
||||
COPY . .
|
||||
COPY .env.template ./.env
|
||||
|
||||
# Install the dependencies and make the folder
|
||||
RUN npm install && mkdir /react-ui && mv ./node_modules ./react-ui
|
||||
|
||||
WORKDIR /react-ui
|
||||
|
||||
COPY . .
|
||||
RUN npm install
|
||||
|
||||
# Build the project and copy the files
|
||||
RUN npm run build
|
||||
@@ -28,7 +24,7 @@ COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
# Copy from the stahg 1
|
||||
COPY --from=builder /react-ui/build /usr/share/nginx/html
|
||||
COPY --from=builder /ota-admin-portal/build /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80 443 8080
|
||||
|
||||
|
||||
Reference in New Issue
Block a user