Skip to content

Commit eb6cef6

Browse files
committed
ci: avoid interactive mode for docker login
1 parent 0ae7247 commit eb6cef6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.gitlab/ci-images.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CentOS:
3434
- php-7.0
3535
script:
3636
- cd dockerfiles/ci/centos/7
37-
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_TOKEN" $CI_REGISTRY
37+
- echo "$CI_REGISTRY_TOKEN" | docker login --password-stdin -u "$CI_REGISTRY_USER" "$CI_REGISTRY"
3838
- docker buildx bake --no-cache --pull --push $PHP_VERSION
3939

4040
Alpine:
@@ -63,7 +63,7 @@ Alpine:
6363
- 7.0-alpine
6464
script:
6565
- cd dockerfiles/ci/alpine_compile_extension
66-
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_TOKEN" $CI_REGISTRY
66+
- echo "$CI_REGISTRY_TOKEN" | docker login --password-stdin -u "$CI_REGISTRY_USER" "$CI_REGISTRY"
6767
- docker buildx bake --no-cache --pull --push $PHP_VERSION
6868

6969
Bookworm:
@@ -94,7 +94,7 @@ Bookworm:
9494
- php-7.0
9595
script:
9696
- cd dockerfiles/ci/bookworm
97-
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_TOKEN" $CI_REGISTRY
97+
- echo "$CI_REGISTRY_TOKEN" | docker login --password-stdin -u "$CI_REGISTRY_USER" "$CI_REGISTRY"
9898
- docker buildx bake --no-cache --pull --push $PHP_VERSION
9999

100100
Buster:
@@ -125,5 +125,5 @@ Buster:
125125
- php-7.0
126126
script:
127127
- cd dockerfiles/ci/buster
128-
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_TOKEN" $CI_REGISTRY
128+
- echo "$CI_REGISTRY_TOKEN" | docker login --password-stdin -u "$CI_REGISTRY_USER" "$CI_REGISTRY"
129129
- docker buildx bake --no-cache --pull --push $PHP_VERSION

0 commit comments

Comments
 (0)