Skip to content

Commit

Permalink
Add relay to docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
pschork committed Dec 5, 2024
1 parent f76b942 commit 951c24e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY contracts /app/contracts
COPY indexer /app/indexer
COPY encoding /app/encoding
COPY relay /app/relay
COPY inabox /app/inabox

# Churner build stage
FROM common-builder AS churner-builder
Expand Down Expand Up @@ -98,6 +99,13 @@ RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -o ./bin/controller ./cmd/controller

# Relay build stage
FROM common-builder AS relay-builder
WORKDIR /app/relay
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -o ./bin/relay ./cmd

# Final stages for each component
FROM alpine:3.18 AS churner
COPY --from=churner-builder /app/operators/bin/churner /usr/local/bin
Expand Down Expand Up @@ -134,3 +142,7 @@ ENTRYPOINT ["nodeplugin"]
FROM alpine:3.18 AS controller
COPY --from=controller-builder /app/disperser/bin/controller /usr/local/bin
ENTRYPOINT ["controller"]

FROM alpine:3.18 AS relay
COPY --from=relay-builder /app/relay/bin/relay /usr/local/bin
ENTRYPOINT ["relay"]
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,5 @@ docker-release-build:
BUILD_TAG=${SEMVER} SEMVER=${SEMVER} GITDATE=${GITDATE} GIT_SHA=${GITSHA} GIT_SHORT_SHA=${GITCOMMIT} \
docker buildx bake node-group-release ${PUSH_FLAG}


semver:
echo "${SEMVER}"
25 changes: 22 additions & 3 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ group "all" {
"churner",
"dataapi",
"traffic-generator",
"controller"
"controller",
"relay"
]
}

Expand All @@ -67,7 +68,8 @@ group "ci-release" {
"retriever",
"churner",
"dataapi",
"controller"
"controller",
"relay"
]
}

Expand All @@ -82,7 +84,8 @@ group "internal-release" {
"churner-internal",
"dataapi-internal",
"traffic-generator-internal",
"controller-internal"
"controller-internal",
"relay-internal"
]
}

Expand Down Expand Up @@ -214,6 +217,22 @@ target "traffic-generator2-internal" {
]
}

target "relay" {
context = "."
dockerfile = "./Dockerfile"
target = "relay"
tags = ["${REGISTRY}/${REPO}/relay:${BUILD_TAG}"]
}

target "relay-internal" {
inherits = ["relay"]
tags = [
"${REGISTRY}/eigenda-relay:${BUILD_TAG}",
"${REGISTRY}/eigenda-relay:${GIT_SHA}",
"${REGISTRY}/eigenda-relay:sha-${GIT_SHORT_SHA}"
]
}

target "dataapi" {
context = "."
dockerfile = "./Dockerfile"
Expand Down

0 comments on commit 951c24e

Please sign in to comment.