Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
with:
context: .
file: ./Dockerfile
build-args: |
GIT_COMMIT=${{ github.sha }}
GIT_BRANCH=${{ github.ref_name }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag }}-${{ matrix.arch }}
platforms: linux/${{ matrix.arch }}
Expand Down
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ WORKDIR /app
RUN cargo install cargo-chef
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config

LABEL org.opencontainers.image.source=https://github.com/lambdaclass/ethlambda
LABEL org.opencontainers.image.description="ethlambda is a modular Ethereum beam chain client."
LABEL org.opencontainers.image.licenses="MIT"

# Builds a cargo-chef plan
FROM chef AS planner
COPY --exclude=.git --exclude=target . .
Expand Down Expand Up @@ -46,6 +42,16 @@ RUN cp /app/target/$BUILD_PROFILE/ethlambda /app/ethlambda
FROM ubuntu AS runtime
WORKDIR /app

LABEL org.opencontainers.image.source=https://github.com/lambdaclass/ethlambda
LABEL org.opencontainers.image.description="Minimalist, fast and modular implementation of the Lean Ethereum client written in Rust."
LABEL org.opencontainers.image.licenses="MIT"

ARG GIT_COMMIT=unknown
ARG GIT_BRANCH=unknown

LABEL org.opencontainers.image.revision=$GIT_COMMIT
LABEL org.opencontainers.image.ref.name=$GIT_BRANCH

# Copy ethlambda over from the build stage
COPY --from=builder /app/ethlambda /usr/local/bin

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ test: ## 🧪 Run all tests, then forkchoice tests with skip-signature-verificat
cargo test --workspace
cargo test -p ethlambda-blockchain --features skip-signature-verification --test forkchoice_spectests

GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)

docker-build: ## 🐳 Build the Docker image
docker build -t ghcr.io/lambdaclass/ethlambda:local .
docker build \
--build-arg GIT_COMMIT=$(GIT_COMMIT) \
--build-arg GIT_BRANCH=$(GIT_BRANCH) \
-t ghcr.io/lambdaclass/ethlambda:local .

LEAN_SPEC_COMMIT_HASH:=fbbacbea4545be870e25e3c00a90fc69e019c5bb

Expand Down