Skip to content

Instantly share code, notes, and snippets.

@0xff00ff
Created December 26, 2019 16:30
Show Gist options
  • Save 0xff00ff/161958bb09278659bb716590bf70441a to your computer and use it in GitHub Desktop.
Save 0xff00ff/161958bb09278659bb716590bf70441a to your computer and use it in GitHub Desktop.
dockerfile front (vue)
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