From 5fb1a4ce498fdd34bbcd0f12e28513e47301983a Mon Sep 17 00:00:00 2001
From: Alex Sharov <AskAlexSharov@gmail.com>
Date: Mon, 15 Nov 2021 10:14:19 +0700
Subject: [PATCH] Add db-tools to Dockerfile (#2950)

---
 .github/workflows/ci.yml | 2 +-
 Dockerfile               | 2 +-
 Makefile                 | 5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 21af75bccc..aa442c0103 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -68,7 +68,7 @@ jobs:
         shell: powershell
 
   docker:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@v2
       - run: git submodule update --init --recursive --force
diff --git a/Dockerfile b/Dockerfile
index 4297dec68a..db4122f234 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@ WORKDIR /app
 ADD . .
 
 # expect that host run `git submodule update --init`
-RUN make erigon rpcdaemon integration sentry hack
+RUN make erigon rpcdaemon integration sentry hack db-tools
 
 FROM docker.io/library/alpine:3.14
 
diff --git a/Makefile b/Makefile
index f49d1930f5..246e4b3467 100644
--- a/Makefile
+++ b/Makefile
@@ -110,9 +110,10 @@ tracker:
 	@echo "Done building."
 	@echo "Run \"$(GOBIN)/tracker\" to run snapshots tracker."
 
-db-tools: libmdbx
+db-tools:
 	@echo "Building db-tools"
-	git submodule update --init --recursive
+	rm -rf libmdbx # hub.docker.com setup incorrect gitpath for git modules. Just remove it and re-init submodule.
+	git submodule update --init --recursive --force
 	cd libmdbx && MDBX_BUILD_TIMESTAMP=unknown make tools
 	cp libmdbx/mdbx_chk $(GOBIN)
 	cp libmdbx/mdbx_copy $(GOBIN)
-- 
GitLab