Skip to content

Instantly share code, notes, and snippets.

@l2fprod
Created October 7, 2018 12:35
Show Gist options
  • Save l2fprod/cded21dc708d1c89663d4f43b4d9f5eb to your computer and use it in GitHub Desktop.
Save l2fprod/cded21dc708d1c89663d4f43b4d9f5eb to your computer and use it in GitHub Desktop.
knative / lw / web / Dockerfile
# 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