diff --git a/Dockerfile b/Dockerfile index e5ff23a..ae5da55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,29 +32,20 @@ ## If you now want to deploy a new client version, just redo the second step. -FROM debian +FROM node:14-alpine -RUN apt-get update &&\ - apt-get install -y curl git-core &&\ - curl -sL https://deb.nodesource.com/setup_14.x | bash - &&\ - apt-get update &&\ - apt-get install -y nodejs +RUN apk update && apk add git ca-certificates +RUN adduser -S ethnetintel -RUN apt-get update &&\ - apt-get install -y build-essential +WORKDIR /home/ethnetintel/eth-net-intelligence-api -RUN useradd -m ethnetintel +ADD package.json . +RUN npm install && npm install -g pm2 -RUN cd /home/ethnetintel &&\ - git clone https://github.com/cubedro/eth-net-intelligence-api &&\ - cd eth-net-intelligence-api &&\ - npm install &&\ - npm install -g pm2 +ADD . . -RUN chown -R ethnetintel. /home/ethnetintel +RUN chown -R ethnetintel. . USER ethnetintel -WORKDIR /home/ethnetintel/eth-net-intelligence-api - CMD [ "pm2-runtime", "app.json" ]