Created
January 9, 2020 17:29
-
-
Save stephenhillier/2d98357a55185246b55e1231668853f9 to your computer and use it in GitHub Desktop.
Dockerfile for building and deploying Vue
This file contains 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:10 as build | |
WORKDIR /app | |
COPY package*.json /app/ | |
RUN npm ci | |
COPY . . | |
# run unit tests and build | |
RUN npm run test:unit && npm run build | |
FROM nginx:1.12 | |
COPY --from=build /app/dist/ /tmp/src | |
COPY --from=build /app/.s2i/bin/run /usr/libexec/s2i/run | |
COPY --from=build /app/nginx.conf.tmpl /opt/app-root/etc/nginx.conf.tmpl | |
RUN /usr/libexec/s2i/assemble | |
EXPOSE 8080 | |
CMD /usr/libexec/s2i/run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment