Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delve support #15713

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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: 2 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ COMMIT_SHA ?= $(shell git rev-parse HEAD)
VERSION = $(shell jq -r '.version' package.json)
GO_LDFLAGS := $(shell tools/bin/ldflags)
GOFLAGS = -ldflags "$(GO_LDFLAGS)"
GCFLAGS = -gcflags "$(GO_GCFLAGS)"

.PHONY: install
install: install-chainlink-autoinstall ## Install chainlink and all its dependencies.
Expand Down Expand Up @@ -38,7 +39,7 @@ docs: ## Install and run pkgsite to view Go docs

.PHONY: install-chainlink
install-chainlink: operator-ui ## Install the chainlink binary.
go install $(GOFLAGS) .
go install $(GCFLAGS) $(GOFLAGS) .

.PHONY: install-chainlink-cover
install-chainlink-cover: operator-ui ## Install the chainlink binary with cover flag.
Expand Down
12 changes: 11 additions & 1 deletion plugins/chainlink.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ RUN go mod download
# Env vars needed for chainlink build
ARG COMMIT_SHA

# Flags for Go Delve debugger
ARG GO_GCFLAGS

COPY . .

RUN apt-get update && apt-get install -y jq

# Install Delve for debugging
RUN go install github.com/go-delve/delve/cmd/dlv@latest
skudasov marked this conversation as resolved.
Show resolved Hide resolved

# Build the golang binaries
RUN make install-chainlink
RUN make GO_GCFLAGS="${GO_GCFLAGS}" install-chainlink

# Install medianpoc binary
RUN make install-medianpoc
Expand Down Expand Up @@ -52,6 +58,7 @@ WORKDIR /chainlink-starknet/relayer
COPY --from=buildgo /chainlink-starknet/relayer .
RUN go install ./pkg/chainlink/cmd/chainlink-starknet


# Final image: ubuntu with chainlink binary
FROM ubuntu:20.04

Expand All @@ -65,6 +72,9 @@ RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update && apt-get install -y postgresql-client-16 \
&& apt-get clean all

# Copy Delve debugger from build stage
COPY --from=buildgo /go/bin/dlv /usr/local/bin/dlv

COPY --from=buildgo /go/bin/chainlink /usr/local/bin/
COPY --from=buildgo /go/bin/chainlink-medianpoc /usr/local/bin/
COPY --from=buildgo /go/bin/chainlink-ocr3-capability /usr/local/bin/
Expand Down
Loading