diff --git a/Dockerfile b/Dockerfile
index 3820fbb95bb5b85da2112171c6a932af37424e06..5ef6171d69091a7ea40d3c8698230f94ccbe89c3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,11 @@
 FROM golang:1.15-alpine3.12 as builder
 
+ARG git_commit
+ENV GIT_COMMIT=$git_commit
+
+# for linters to avoid warnings. we won't use linters in Docker anyway
+ENV LATEST_COMMIT="undefined"
+
 RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++
 
 WORKDIR /app
diff --git a/Makefile b/Makefile
index c268aca2fc618f11214f307c414eac62dcdbc99e..245923ef2484413a1a797293d1a20c8db7472c2b 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ ifeq ($(LATEST_COMMIT),)
 LATEST_COMMIT := $(shell git log -n 1 HEAD~1 --pretty=format:"%H")
 endif
 
-GIT_COMMIT=$(shell git rev-list -1 HEAD)
+GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
 
 OS = $(shell uname -s)
 ARCH = $(shell uname -m)
@@ -22,10 +22,7 @@ endif
 all: tg hack tester rpctest state pics rpcdaemon integration db-tools
 
 docker:
-	docker build -t turbo-geth:latest .
-
-docker-alltools:
-	docker build -t turbo-geth-alltools:latest -f Dockerfile.alltools .
+	docker build -t turbo-geth:latest  --build-arg git_commit='${GIT_COMMIT}' .
 
 docker-compose:
 	docker-compose up