Skip to content

Instantly share code, notes, and snippets.

@lucj
Created June 17, 2019 10:21
Show Gist options
  • Save lucj/24307d7c14b50b6aaad1502eef524029 to your computer and use it in GitHub Desktop.
Save lucj/24307d7c14b50b6aaad1502eef524029 to your computer and use it in GitHub Desktop.
FROM node:8.12.0-alpine AS build
COPY . /build
WORKDIR /build
RUN npm i
RUN node clean.js
RUN ./node_modules/mustache/bin/mustache upcoming_events.json index.mustache > index.html
RUN ./node_modules/mustache/bin/mustache past_events.json past.mustache > past.html
FROM nginx:1.14-alpine
COPY --from=build /build/*.html /usr/share/nginx/html/
COPY events.json /usr/share/nginx/html/
COPY css /usr/share/nginx/html/css
COPY js /usr/share/nginx/html/js
COPY img /usr/share/nginx/html/img
ARG token
RUN apk add --no-cache ca-certificates && update-ca-certificates && \
wget -O /microscanner https://get.aquasec.com/microscanner && \
chmod +x /microscanner && \
/microscanner --html --continue-on-failure ${token} && \
rm -rf /microscanner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment