Skip to content

Instantly share code, notes, and snippets.

@jac18281828
Created July 30, 2024 19:00
Show Gist options
  • Save jac18281828/88306953d7dbacd815b6fb7ab59dd09a to your computer and use it in GitHub Desktop.
Save jac18281828/88306953d7dbacd815b6fb7ab59dd09a to your computer and use it in GitHub Desktop.
Install ethereum in ubuntu Dockerfile
FROM ubuntu:24.04
ARG HTTP_PORT=8545
ARG ETH_VERSION=1.14.7
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:ethereum/ethereum \
&& apt-get update \
&& apt-get install -y ethereum sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN adduser --shell /bin/bash -uid 1001 alice
LABEL org.label-schema.name="layr-devnet" \
org.label-schema.description="Ethereum Node for Layr Devnet" \
org.label-schema.url="https://github.com/layr-labs/layr-devnet/" \
org.label-schema.vcs-url="git@github.com:layr-labs/layr-devnet.git" \
org.label-schema.vendor="Eigen Labs" \
org.label-schema.schema-version="1.0.0" \
org.opencontainers.image.description="Ethereum Node for Layr Devnet"
VOLUME ["/home/alice"]
WORKDIR /home/alice
RUN chown -R alice:alice /home/alice
ENV USER=alice
USER alice:alice
ENV PATH=${PATH}:/usr/local/bin
ENV HTTP_PORT=${HTTP_PORT}
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:${HTTP_PORT} || exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment