Created
June 17, 2019 10:21
-
-
Save lucj/24307d7c14b50b6aaad1502eef524029 to your computer and use it in GitHub Desktop.
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: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