diff --git a/production/docker/Dockerfile b/production/docker/Dockerfile index f3da363..7bb12a3 100644 --- a/production/docker/Dockerfile +++ b/production/docker/Dockerfile @@ -3,9 +3,19 @@ #IMAGE BUILD COMMANDS # ct-base-ubuntu = ubuntu 18.04 + nodejs v10 LTS -FROM christroutner/ct-base-ubuntu +#FROM christroutner/ct-base-ubuntu +FROM ubuntu:20.04 MAINTAINER Chris Troutner +#Update the OS and install any OS packages needed. +RUN apt-get update +RUN apt-get install -y sudo git curl nano gnupg wget + +#Install Node and NPM +RUN curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh +RUN bash nodesource_setup.sh +RUN apt-get install -y nodejs build-essential + #Create the user 'safeuser' and add them to the sudo group. #RUN useradd -ms /bin/bash safeuser #RUN adduser safeuser sudo @@ -22,6 +32,13 @@ WORKDIR /home/safeuser #RUN echo "export PATH=~/.npm-global/bin:$PATH" >> /home/safeuser/.profile #RUN runuser -l safeuser -c "npm config set prefix '~/.npm-global'" +# Update to the latest version of npm. +# Working with npm@7.21.1 +RUN npm install -g npm@7.23.0 + +# npm mirror to prevent direct dependency on npm. +RUN npm set registry http://94.130.170.209:4873/ + # Switch to user account. #USER safeuser # Prep 'sudo' commands.