Created
December 26, 2019 16:30
-
-
Save 0xff00ff/161958bb09278659bb716590bf70441a to your computer and use it in GitHub Desktop.
dockerfile front (vue)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8.15-alpine AS builder | |
WORKDIR /usr/src/app | |
RUN apk add --no-cache git python krb5 krb5-libs gcc make g++ krb5-dev | |
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] | |
COPY . . | |
RUN rm -rf node_modules | |
RUN npm install | |
RUN npm run build | |
FROM nginx | |
RUN rm /etc/nginx/conf.d/*.conf | |
COPY ./system/nginx.spa.conf /etc/nginx/conf.d/ | |
COPY --from=builder /usr/src/app/dist /usr/share/nginx/html | |
COPY ./system/robots.txt /usr/share/nginx/html | |
EXPOSE 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment