How to set environment variable to empty string

i want use docker:dind without TLS

kind: pipeline
name: main

steps:
  - name: docker
    image: docker:dind
    privileged: true
    detach: true
    environment:
      DOCKER_TLS_CERTDIR: ''
    entrypoint: 
      - /bin/sh
    commands: 
      - env

but it not work

+ env
...
DOCKER_TLS_CERTDIR=/certs
...

you can do this:

steps:
  - name: docker
    image: docker:dind
    commands: 
      - unset DOCKER_TLS_CERTDIR

or this:

steps:
  - name: docker
    image: docker:dind
    commands: 
      - export DOCKER_TLS_CERTDIR=''
1 Like