From 6003796741ade6fcd32c78e08b053acf9c70c82e Mon Sep 17 00:00:00 2001 From: Leopere <1068374+Leopere@users.noreply.github.com> Date: Wed, 29 Dec 2021 14:06:11 -0500 Subject: [PATCH] Upgraded to latest alpine instead of EOL Debian and tested. Debian Stretch is at the end of life date next year so I upgraded and tested the usability of Alpine. Also verified the default settings of this container still work with less env-vars defined in the Dockerfile. Next step will be to fully add documentation mentioning the env-vars that are now missing from the official image. --- Dockerfile | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index ffb2838..e7638cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,22 @@ -FROM node:14.8.0-stretch +FROM node:17-alpine + +RUN mkdir -p /usr/src/app && \ + chown node:node /usr/src/app && \ + apk add bash + +USER node:node + +WORKDIR /usr/src/app + +COPY --chown=node:node . . + +RUN npm install && \ + npm install redis@0.8.1 && \ + npm install pg@4.1.1 && \ + npm install memcached@2.2.2 && \ + npm install aws-sdk@2.738.0 && \ + npm install rethinkdbdash@2.3.31 + ENV STORAGE_TYPE=memcached \ STORAGE_HOST=127.0.0.1 \ @@ -23,22 +41,6 @@ ENV STORAGE_TYPE=memcached \ RATELIMITS_BLACKLIST=example1.blacklist,example2.blacklist \ DOCUMENTS=about=./about.md -RUN mkdir -p /usr/src/app && \ - chown node:node /usr/src/app - -USER node:node - -WORKDIR /usr/src/app - -COPY --chown=node:node . . - -RUN npm install && \ - npm install redis@0.8.1 && \ - npm install pg@4.1.1 && \ - npm install memcached@2.2.2 && \ - npm install aws-sdk@2.738.0 && \ - npm install rethinkdbdash@2.3.31 - EXPOSE ${PORT} STOPSIGNAL SIGINT ENTRYPOINT [ "bash", "docker-entrypoint.sh" ]