Created
October 7, 2018 12:35
-
-
Save l2fprod/cded21dc708d1c89663d4f43b4d9f5eb to your computer and use it in GitHub Desktop.
knative / lw / web / Dockerfile
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
# build | |
FROM node:6-alpine AS build | |
WORKDIR /app | |
COPY . . | |
ARG CONTROLLER_SERVICE=http://lw-controller:8080 | |
ENV CONTROLLER_SERVICE="${CONTROLLER_SERVICE}" | |
RUN cd /app \ | |
&& apk add --no-cache --virtual .build-deps alpine-sdk python \ | |
&& npm install \ | |
&& npm run deploy:prod \ | |
&& apk del .build-deps | |
# run | |
FROM nginx:stable | |
COPY --from=build /app/dist/ /var/www/ | |
COPY --from=build /app/dist/docker-nginx.conf /etc/nginx/conf.d/default.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment