From 9e9abe945fb521d2903d5678e2f8d539aee13deb Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 22 Jul 2021 16:22:40 -0600 Subject: [PATCH] struct(dockerfile): initial build skeleton --- build/Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 build/Dockerfile diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..0957976 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,36 @@ +# LiveReload-npm server supporting SSL/TLS +ARG NODE_VERSION=16 +ARG ALPINE_VERSION=3.14 +FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} + +RUN apk --update --no-cache add \ + tini \ + && mkdir /certs \ + && chown node:node /certs \ + && chmod 700 certs + +ENV NODE_ENV=production +ENV NPM_CONFIG_PREFIX=/home/node/.npm-global +ENV PATH=/home/node/.npm-global/bin:$PATH + +USER node +WORKDIR /home/node +RUN mkdir -p .npm-global/bin .npm-global/lib \ + && npm config set fun false \ + && npm config set update-notifier false \ + && npm install livereload --save +COPY [ "livereload.js", "livereload.js" ] + +EXPOSE 35729 +VOLUME [ "/var/watch" ] + +ENV TZ="Etc/UTC" +ENV LR_PORT=35729 +ENV LR_EXTS="html,xml,css,js,jsx,ts,tsx,php,py" +ENV LR_EXCLUDE=".git/,.svn/,.vscode/,.idea/" +ENV LR_DELAY=500 + +ENTRYPOINT [ "/sbin/tini", "--" ] +CMD [ "node", "livereload.js" ] + +#EOF