Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
fix: adding build image
Browse files Browse the repository at this point in the history
  • Loading branch information
secondsun committed Sep 16, 2020
1 parent e1ee2d8 commit a307ab8
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM nginx
FROM node:14.9.0-alpine3.10 as build0

WORKDIR /srv
COPY . ./
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash &&\
. /root/.bashrc && \
nvm install 14.9.0 && \
npm install && \
npm run build
RUN cp -a /srv/build/. /usr/share/nginx/html
RUN npm install
RUN npm run build


FROM nginx
EXPOSE 5000
COPY --from=build0 /srv/build /usr/share/nginx/html/
COPY ./startup.sh /srv/startup.sh
ENTRYPOINT [ "/srv/startup.sh"]
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit a307ab8

Please sign in to comment.