Skip to content

Commit d7c2fa6

Browse files
Switch to Alpine
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.
1 parent 24d9169 commit d7c2fa6

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

Dockerfile

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,20 @@
3232
## If you now want to deploy a new client version, just redo the second step.
3333

3434

35-
FROM debian
35+
FROM node:14-alpine
3636

37-
RUN apt-get update &&\
38-
apt-get install -y curl git-core &&\
39-
curl -sL https://deb.nodesource.com/setup_14.x | bash - &&\
40-
apt-get update &&\
41-
apt-get install -y nodejs
37+
RUN apk update && apk add git ca-certificates
38+
RUN adduser -S ethnetintel
4239

43-
RUN apt-get update &&\
44-
apt-get install -y build-essential
40+
WORKDIR /home/ethnetintel/eth-net-intelligence-api
4541

46-
RUN useradd -m ethnetintel
42+
ADD package.json .
43+
RUN npm install && npm install -g pm2
4744

48-
RUN cd /home/ethnetintel &&\
49-
git clone https://github.com/cubedro/eth-net-intelligence-api &&\
50-
cd eth-net-intelligence-api &&\
51-
npm install &&\
52-
npm install -g pm2
45+
ADD . .
5346

54-
RUN chown -R ethnetintel. /home/ethnetintel
47+
RUN chown -R ethnetintel. .
5548

5649
USER ethnetintel
5750

58-
WORKDIR /home/ethnetintel/eth-net-intelligence-api
59-
6051
CMD [ "pm2-runtime", "app.json" ]

0 commit comments

Comments
 (0)