An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
besu/Dockerfile

43 lines
1.7 KiB

# Pantheon release grade Docker image
#
# What is this image for ?
# This image is for using Pantheon within Docker for any purpose, test, dev, production.
# The Docker file integrates two steps, first the build with a JDK and then the runnning image with a JRE.
# Then you don't need a JDK installed locally to build Pantheon, just run the docker build
# command and once the image is created you can use it as if you were using a regular Patheon binary.
#
# How to use this image:
#
# first build it (use the name and tag you like) :
#
# docker build -t mypantheon:myTag .
#
# then run pantheon:
# Either as a simple node with sync on mainnet with a volume for data (keeps the database between runs) and that's all:
#
# docker run -d --mount source=pantheon_database,target=/opt/pantheon/database --name myPantheon mypantheon:myTag
#
# or as a simple node with sync on mainnet with a volume for data (keeps the database between runs) and HTTP/WS RPC access :
#
# docker run -d --mount source=pantheon_database,target=/opt/pantheon/database \
# --name myPantheon -p 8545:8545 -p 8546:8546 mypantheon:myTag \
# --rpc-enabled --rpc-listen=0.0.0.0:8545 --rpc-cors-origins=mydomain.tld \
# --ws-enabled -ws-listen=0.0.0.0:8546
6 years ago
# builder temporary image with JDK
FROM openjdk:8-jdk-slim as builder
# copy all pantheon source to the image
COPY . /tmp/pantheon
WORKDIR /tmp/pantheon
# build the distribution
RUN ./gradlew installDist
6 years ago
# final image with only jre
FROM openjdk:8-jre-slim
# copy application from builder image
COPY --from=builder /tmp/pantheon/build/install/pantheon /opt/pantheon/
6 years ago
# List Exposed Ports
EXPOSE 8546 8545 30303
6 years ago
# specify default command
ENTRYPOINT ["/opt/pantheon/bin/pantheon"]