Let the dockerfile do the build
This commit is contained in:
parent
50fd574a8e
commit
b4b1ebd36b
1 changed files with 14 additions and 5 deletions
19
Dockerfile
19
Dockerfile
|
@ -1,7 +1,16 @@
|
||||||
FROM nginx
|
FROM node:18 AS build
|
||||||
|
|
||||||
|
WORKDIR /usr
|
||||||
|
COPY package.json ./
|
||||||
|
COPY yarn.lock ./
|
||||||
|
RUN yarn install --frozen-lockfile
|
||||||
|
COPY . ./
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY --from=build /usr/dist /usr/share/nginx/html
|
||||||
|
#COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
CMD ["nginx","-g","daemon off;"]
|
||||||
RUN rm -rf /usr/share/nginx/html/*
|
|
||||||
|
|
||||||
COPY ./dist/ /usr/share/nginx/html/
|
|
||||||
|
|
Loading…
Reference in a new issue