Skip to content

Commit

Permalink
Switch to Alpine
Browse files Browse the repository at this point in the history
In an effort to more align with goerli#3 goals I switched to node:14-alpine - but I'm not sure if modification of app.json to passing env variables to docker is more or less preferred so here's another option.
  • Loading branch information
MysticRyuujin committed Apr 27, 2021
1 parent 24d9169 commit d7c2fa6
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions Dockerfile
Expand Up @@ -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" ]

0 comments on commit d7c2fa6

Please sign in to comment.