@@ -74,29 +74,39 @@ build-codebattle:
7474 docker pull ghcr.io/hexlet-codebattle/codebattle:assets-image || true
7575 docker pull ghcr.io/hexlet-codebattle/codebattle:compile-image || true
7676 docker pull ghcr.io/hexlet-codebattle/codebattle:latest || true
77- DOCKER_BUILDKIT=1 docker build --target assets-image \
77+ DOCKER_BUILDKIT=1 docker buildx build --load --target assets-image \
7878 --file services/app/Containerfile.codebattle \
79- --build-arg GIT_HASH=$(GIT_HASH ) \
79+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:assets-cache \
80+ --cache-to type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:assets-cache,mode=max \
8081 --cache-from ghcr.io/hexlet-codebattle/codebattle:assets-image \
8182 --build-arg BUILDKIT_INLINE_CACHE=1 \
8283 --tag ghcr.io/hexlet-codebattle/codebattle:assets-image services/app
83- DOCKER_BUILDKIT=1 docker build --target compile-image \
84+ DOCKER_BUILDKIT=1 docker buildx build --load --target compile-image \
8485 --file services/app/Containerfile.codebattle \
85- --build-arg GIT_HASH=$(GIT_HASH ) \
86+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:assets-cache \
87+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:compile-cache \
88+ --cache-to type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:compile-cache,mode=max \
8689 --cache-from ghcr.io/hexlet-codebattle/codebattle:assets-image \
8790 --cache-from ghcr.io/hexlet-codebattle/codebattle:compile-image \
8891 --build-arg BUILDKIT_INLINE_CACHE=1 \
8992 --tag ghcr.io/hexlet-codebattle/codebattle:compile-image services/app
90- DOCKER_BUILDKIT=1 docker build --target nginx-assets \
93+ DOCKER_BUILDKIT=1 docker buildx build --load --target nginx-assets \
9194 --file services/app/Containerfile.codebattle \
95+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:assets-cache \
96+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:compile-cache \
97+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/nginx-assets:buildcache \
98+ --cache-to type=registry,ref=ghcr.io/hexlet-codebattle/nginx-assets:buildcache,mode=max \
9299 --cache-from ghcr.io/hexlet-codebattle/codebattle:assets-image \
93100 --cache-from ghcr.io/hexlet-codebattle/codebattle:compile-image \
94101 --cache-from ghcr.io/hexlet-codebattle/nginx-assets:latest \
95102 --build-arg BUILDKIT_INLINE_CACHE=1 \
96103 --tag ghcr.io/hexlet-codebattle/nginx-assets:latest services/app
97- DOCKER_BUILDKIT=1 docker build --target runtime-image \
104+ DOCKER_BUILDKIT=1 docker buildx build --load --target runtime-image \
98105 --file services/app/Containerfile.codebattle \
99106 --build-arg GIT_HASH=$(GIT_HASH ) \
107+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:compile-cache \
108+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:runtime-cache \
109+ --cache-to type=registry,ref=ghcr.io/hexlet-codebattle/codebattle:runtime-cache,mode=max \
100110 --cache-from ghcr.io/hexlet-codebattle/codebattle:compile-image \
101111 --cache-from ghcr.io/hexlet-codebattle/codebattle:latest \
102112 --build-arg BUILDKIT_INLINE_CACHE=1 \
@@ -150,13 +160,19 @@ push-codebattle:
150160build-runner :
151161 docker pull ghcr.io/hexlet-codebattle/runner:compile-image || true
152162 docker pull ghcr.io/hexlet-codebattle/runner:latest || true
153- DOCKER_BUILDKIT=1 docker build --target compile-image \
163+ DOCKER_BUILDKIT=1 docker buildx build --load --target compile-image \
154164 --file services/app/Containerfile.runner \
165+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/runner:compile-cache \
166+ --cache-to type=registry,ref=ghcr.io/hexlet-codebattle/runner:compile-cache,mode=max \
155167 --cache-from ghcr.io/hexlet-codebattle/runner:compile-image \
156168 --build-arg BUILDKIT_INLINE_CACHE=1 \
157169 --tag ghcr.io/hexlet-codebattle/runner:compile-image services/app
158- DOCKER_BUILDKIT=1 docker build --target runtime-image \
170+ DOCKER_BUILDKIT=1 docker buildx build --load --target runtime-image \
159171 --file services/app/Containerfile.runner \
172+ --build-arg GIT_HASH=$(GIT_HASH ) \
173+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/runner:compile-cache \
174+ --cache-from type=registry,ref=ghcr.io/hexlet-codebattle/runner:runtime-cache \
175+ --cache-to type=registry,ref=ghcr.io/hexlet-codebattle/runner:runtime-cache,mode=max \
160176 --cache-from ghcr.io/hexlet-codebattle/runner:compile-image \
161177 --cache-from ghcr.io/hexlet-codebattle/runner:latest \
162178 --build-arg BUILDKIT_INLINE_CACHE=1 \
0 commit comments