Error: Cannot perform an interactive login from a non TTY device

Hello,

I am trying to push a docker image in the gitlab registry but at login I receive the error :
Error: Cannot perform an interactive login from a non TTY device
My code is following as much as could be the gitlab official documentation from this section

the .gitlab-ci.yml file is as follow

stages:
  - test
  - build

variables:
  DOCKER_TLS_CERTDIR: "/certs"
  IMAGE_TAG: $CI_REGISTRY_IMAGE/employee-image:$CI_COMMIT_REF_SLUG

#some job for test stage that succeed (lint_test)

build:
  image: docker:19.03.13
  services:
    - docker:19.03.13-dind
  stage: build
  before_script:
    - echo "$DOCKER_REGISTRY_PASS" | docker login $DOCKER_REGISTRY --username $DOCKER_REGISTRY_USER --password-stdin
  script:
    - docker build -t $IMAGE_TAG .
    - docker images
    - docker push $IMAGE_TAG

NB: it fails at login, not even starting the script

thanks !
PS : I am relatively new to this so it might be a really dumb mistake :confused: