pinecrypt-gateway-frontend/Dockerfile

23 lines
1.4 KiB
Docker
Raw Permalink Normal View History

FROM alpine
MAINTAINER Pinecrypt Labs <info@pinecrypt.com>
2021-05-27 10:15:46 +00:00
RUN apk add --update npm nginx rsync bash
2021-08-12 20:22:52 +00:00
RUN npm install --prefix /usr/local --silent --no-optional -g nunjucks@2.5.2 nunjucks-date@1.2.0 bootstrap@4.0.0-alpha.6 jquery timeago tether font-awesome qrcode-svg xterm rollup
2021-06-25 19:26:05 +00:00
RUN test -e /usr/local/lib/node_modules/jquery/dist/jquery.min.js
2021-05-27 10:15:46 +00:00
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80 443 8443
WORKDIR /var/lib/nginx/html/
2021-08-02 13:55:09 +00:00
RUN npm init -y && npm i pkijs rollup-plugin-node-resolve
2021-06-18 12:14:35 +00:00
RUN rsync -avq /usr/local/lib/node_modules/font-awesome/fonts/ fonts/
2021-05-27 10:15:46 +00:00
COPY static ./
COPY templates templates
2021-08-02 13:55:09 +00:00
COPY rollup.config.js .
RUN rollup -c
2021-05-27 10:15:46 +00:00
RUN nunjucks-precompile --include snippets --include views templates >> js/bundle.js
2021-08-12 20:22:52 +00:00
RUN bash -c 'cat /usr/local/lib/node_modules/{jquery/dist/jquery.min.js,tether/dist/js/tether.min.js,bootstrap/dist/js/bootstrap.min.js,qrcode-svg/dist/qrcode.min.js,timeago/jquery.timeago.js,nunjucks/browser/nunjucks-slim.min.js,xterm/lib/xterm.js} >> js/bundle.js'
2021-06-18 12:14:35 +00:00
RUN bash -c 'cat /usr/local/lib/node_modules/{tether/dist/css/tether.min.css,bootstrap/dist/css/bootstrap.min.css,font-awesome/css/font-awesome.min.css,xterm/css/xterm.css} >> css/bundle.css'
RUN mkdir /frontend-secrets
RUN ln -s ../server-secrets/self_cert.pem /frontend-secrets/fullchain.pem
RUN ln -s ../server-secrets/self_key.pem /frontend-secrets/privkey.pem
2021-05-27 10:15:46 +00:00
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh