Skip to content

Commit

Permalink
Merge pull request #2 from Dzhuneyt/master
Browse files Browse the repository at this point in the history
fix: Switch Ubuntu to an LTS version
  • Loading branch information
rubenafo authored Apr 8, 2021
2 parents 4b8cfc5 + 26307f7 commit 38367af
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
FROM ubuntu:18.10
FROM ubuntu:20.04

# Switch to ROOT mode
USER root
RUN apt-get update
RUN apt-get install -y --no-install-recommends --fix-missing openssh-server vim build-essential git golang ca-certificates iputils-ping curl netcat nodejs npm
RUN npm install web3 express

# Create a non-root user (for later usage by this Dockerfile)
RUN useradd -m -s /bin/bash ethuser

RUN apt-get update
RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y --no-install-recommends --fix-missing openssh-server vim build-essential git golang ca-certificates iputils-ping curl netcat nodejs npm

# Define the WORKDIR, because recent versions of NodeJS and NPM require it
# Otherwise packages are installed at the container root folder
WORKDIR /home/ethuser

# Switch to the LTS version of NodeJS
RUN npm install -g n && n lts

# Install required packages
RUN npm install web3 express

# Switch to the non-root user for subsequent commands
USER ethuser

RUN mkdir data config
RUN git clone https:/ethereum/go-ethereum
RUN cd go-ethereum && make all
RUN cd go-ethereum && make geth && make all
COPY --chown=ethuser config /home/ethuser/config
USER root
RUN cp /home/ethuser/go-ethereum/build/bin/* /usr/local/bin
Expand Down

0 comments on commit 38367af

Please sign in to comment.