Skip to content

Commit

Permalink
update docker files for prysm docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed Jan 15, 2025
1 parent 7f03c48 commit fe2097d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 37 deletions.
38 changes: 20 additions & 18 deletions starship/docker/chains/Dockerfile.eth-beacon
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
ARG BASE_IMAGE
ARG VERSION
FROM ${BASE_IMAGE}:${VERSION} AS source

FROM golang:1.21-bullseye
FROM golang:1.22.0-bullseye

LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship"

COPY --from=source /beacon-chain /usr/bin
# Set up dependencies
ENV PACKAGES curl make bash jq sed

RUN apt-get update && apt-get install -y \
jq \
curl \
make \
bash \
jq \
sed \
build-essential \
ca-certificates \
libssl-dev \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*
# Install minimum necessary dependencies
RUN apt-get update --yes && \
apt-get install $PACKAGES --no-install-recommends --yes && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /opt

# Download and install the beacon-chain binary
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') && \
BINARY_NAME="beacon-chain-${VERSION}-${PLATFORM}-${ARCH}" && \
echo "Downloading binary: $BINARY_NAME" && \
curl -LO https://github.com/prysmaticlabs/prysm/releases/download/${VERSION}/$BINARY_NAME && \
chmod +x $BINARY_NAME && \
mv $BINARY_NAME /usr/bin/beacon-chain

# Verify installation
RUN beacon-chain --version
24 changes: 17 additions & 7 deletions starship/docker/chains/Dockerfile.eth-prysmctl
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
ARG BASE_IMAGE
ARG VERSION
FROM ${BASE_IMAGE}:${VERSION} AS source

FROM alpine:3.17
FROM golang:1.22.0-bullseye

LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship"

COPY --from=source /prysmctl /usr/bin

# Set up dependencies
ENV PACKAGES curl make bash jq sed

# Install minimum necessary dependencies
RUN apk add --no-cache $PACKAGES
RUN apt-get update --yes && \
apt-get install $PACKAGES --no-install-recommends --yes && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /opt

# Download and install the prysmctl binary
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') && \
BINARY_NAME="prysmctl-${VERSION}-${PLATFORM}-${ARCH}" && \
echo "Downloading binary: $BINARY_NAME" && \
curl -LO https://github.com/prysmaticlabs/prysm/releases/download/${VERSION}/$BINARY_NAME && \
chmod +x $BINARY_NAME && \
mv $BINARY_NAME /usr/bin/prysmctl

# Verify installation
RUN prysmctl --version
24 changes: 17 additions & 7 deletions starship/docker/chains/Dockerfile.eth-validator
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
ARG BASE_IMAGE
ARG VERSION
FROM ${BASE_IMAGE}:${VERSION} AS source

FROM alpine:3.17
FROM golang:1.22.0-bullseye

LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship"

COPY --from=source /validator /usr/bin

# Set up dependencies
ENV PACKAGES curl make bash jq sed

# Install minimum necessary dependencies
RUN apk add --no-cache $PACKAGES
RUN apt-get update --yes && \
apt-get install $PACKAGES --no-install-recommends --yes && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /opt

# Download and install the validator binary
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') && \
BINARY_NAME="validator-${VERSION}-${PLATFORM}-${ARCH}" && \
echo "Downloading binary: $BINARY_NAME" && \
curl -LO https://github.com/prysmaticlabs/prysm/releases/download/${VERSION}/$BINARY_NAME && \
chmod +x $BINARY_NAME && \
mv $BINARY_NAME /usr/bin/validator

# Verify installation
RUN validator --version
5 changes: 0 additions & 5 deletions starship/docker/chains/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ chains:
- name: osmosis
base: ghcr.io/strangelove-ventures/heighliner/osmosis
tags:
- v28.0.0
- v25.0.2
- v25.0.0
- v24.0.3
- v23.0.0
- name: gaia
base: ghcr.io/strangelove-ventures/heighliner/gaia
tags:
- v21.0.1
- v19.2.0
- v19.1.0
- v18.1.0
Expand Down Expand Up @@ -153,17 +151,14 @@ chains:
base: gcr.io/prysmaticlabs/prysm/beacon-chain
file: Dockerfile.eth-beacon
tags:
- stable
- v5.2.0
- name: prysm/validator
base: gcr.io/prysmaticlabs/prysm/validator
file: Dockerfile.eth-validator
tags:
- stable
- v5.2.0
- name: prysm/cmd/prysmctl
base: gcr.io/prysmaticlabs/prysm/cmd/prysmctl
file: Dockerfile.eth-prysmctl
tags:
- stable
- v5.2.0

0 comments on commit fe2097d

Please sign in to comment.