File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,14 @@ variables:
17
17
DOCKER_BUILDKIT : 1
18
18
DOCKER_PLATFORM : " "
19
19
DOCKER_TARGET : " "
20
+ DOCKER_CACHE_FULL_TAG : $CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME:cache
20
21
before_script :
21
22
- apk add --no-cache bash git
22
23
script :
23
24
- docker buildx create --use
24
25
- docker buildx inspect --bootstrap
25
26
- *docker-gitlab-login
26
- - echo "Building $DOCKER_IMAGE_FULL_TAG - Cache from $DOCKER_IMAGE_NAME:cache "
27
+ - echo "Building $DOCKER_IMAGE_FULL_TAG - Cache from $DOCKER_CACHE_FULL_TAG "
27
28
- if [[ -n "$DOCKER_TARGET" ]]; then export TARGET_ARG="--target $DOCKER_TARGET"; fi;
28
29
- if [[ -n "$DOCKER_PLATFORM" ]]; then export PLATFORM_ARG="--platform $DOCKER_PLATFORM"; fi;
29
30
- if [[ -n "$DOCKER_PLATFORM" ]]; then export PLATFORM_SUFFIX="-$(echo $DOCKER_PLATFORM | sed 's/\///')"; fi;
@@ -34,8 +35,8 @@ variables:
34
35
$TARGET_ARG \
35
36
--tag $DOCKER_IMAGE_FULL_TAG$PLATFORM_SUFFIX \
36
37
$PLATFORM_ARG \
37
- --cache-from type=registry,ref=$DOCKER_IMAGE_NAME:cache \
38
- --cache-to type=registry,ref=$DOCKER_IMAGE_NAME:cache \
38
+ --cache-from type=registry,ref=$DOCKER_CACHE_FULL_TAG \
39
+ --cache-to type=registry,ref=$DOCKER_CACHE_FULL_TAG \
39
40
.
40
41
41
42
# Architectures are hardcoded for multiarch, need to make this better
You can’t perform that action at this time.
0 commit comments