improve docker build

This commit is contained in:
chrislu
2025-09-04 21:23:25 -07:00
parent bdf43f53e9
commit f1008b554e
4 changed files with 80 additions and 14 deletions
+8 -1
View File
@@ -20,7 +20,14 @@ build: binary
docker build --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.local .
build_e2e: binary_race
docker build --no-cache -t chrislusf/seaweedfs:e2e -f Dockerfile.e2e .
DOCKER_BUILDKIT=1 docker build \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \
-t chrislusf/seaweedfs:e2e \
-f Dockerfile.e2e .
# Move cache to avoid growing cache size
rm -rf /tmp/.buildx-cache || true
mv /tmp/.buildx-cache-new /tmp/.buildx-cache || true
go_build: # make go_build tags=elastic,ydb,gocdk,hdfs,5BytesOffset,tarantool
docker build --build-arg TAGS=$(tags) --no-cache -t chrislusf/seaweedfs:go_build -f Dockerfile.go_build .