From 7eecbc5d2b2040c0542b0516b12322079e02e33c Mon Sep 17 00:00:00 2001 From: Igor Mandrigin Date: Thu, 30 Jul 2020 17:37:46 +0200 Subject: [PATCH] Fix building in Docker for some enviroments (#834) * Fix building in Docker for some enviroments * debug hanging test --- Dockerfile | 6 +++--- Makefile | 5 +++++ build/ci.go | 1 + cmd/geth/main.go | 12 ++++++------ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78d4e2352..e22f91937 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,13 @@ COPY go.mod go.sum /app/ RUN cd /app && go mod download ADD . /app -RUN cd /app && make geth +RUN cd /app && make tg # Pull Geth into a second stage deploy alpine container FROM alpine:latest RUN apk add --no-cache ca-certificates -COPY --from=builder /app/build/bin/geth /usr/local/bin/ +COPY --from=builder /app/build/bin/tg /usr/local/bin/ EXPOSE 8545 8546 8547 30303 30303/udp -ENTRYPOINT ["geth"] +ENTRYPOINT ["tg"] diff --git a/Makefile b/Makefile index f7d5228cf..a04923ddf 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,11 @@ geth: @echo "Done building." @echo "Run \"$(GOBIN)/tg\" to launch turbo-geth." +tg: + $(GORUN) build/ci.go install ./cmd/geth + @echo "Done building." + @echo "Run \"$(GOBIN)/tg\" to launch turbo-geth." + hack: $(GORUN) build/ci.go install ./cmd/hack @echo "Done building." diff --git a/build/ci.go b/build/ci.go index 364f34086..bef36d48c 100644 --- a/build/ci.go +++ b/build/ci.go @@ -341,6 +341,7 @@ func doTest(cmdline []string) { // and some tests run into timeouts under load. gotest := goTool("test", buildFlags(env)...) gotest.Args = append(gotest.Args, "-p", "1") + *verbose = true if *coverage { gotest.Args = append(gotest.Args, "-covermode=atomic", "-cover") } diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 1c52ff367..6cff7f619 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -278,24 +278,24 @@ func prepare(ctx *cli.Context) { // If we're running a known preset, log it for convenience. switch { case ctx.GlobalIsSet(utils.LegacyTestnetFlag.Name): - log.Info("Starting Geth on Ropsten testnet...") + log.Info("Starting Turbo-Geth on Ropsten testnet...") log.Warn("The --testnet flag is ambiguous! Please specify one of --goerli, --rinkeby, or --ropsten.") log.Warn("The generic --testnet flag is deprecated and will be removed in the future!") case ctx.GlobalIsSet(utils.RopstenFlag.Name): - log.Info("Starting Geth on Ropsten testnet...") + log.Info("Starting Turbo-Geth on Ropsten testnet...") case ctx.GlobalIsSet(utils.RinkebyFlag.Name): - log.Info("Starting Geth on Rinkeby testnet...") + log.Info("Starting Turbo-Geth on Rinkeby testnet...") case ctx.GlobalIsSet(utils.GoerliFlag.Name): - log.Info("Starting Geth on Görli testnet...") + log.Info("Starting Turbo-Geth on Görli testnet...") case ctx.GlobalIsSet(utils.DeveloperFlag.Name): - log.Info("Starting Geth in ephemeral dev mode...") + log.Info("Starting Turbo-Geth in ephemeral dev mode...") case !ctx.GlobalIsSet(utils.NetworkIdFlag.Name): - log.Info("Starting Geth on Ethereum mainnet...") + log.Info("Starting Turbo-Geth on Ethereum mainnet...") } // If we're a full node on mainnet without --cache specified, bump default cache allowance if !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) {