Can't install docker debian script

my os is omv6 pi os lite Debian 11 bulleye
when i try Install Docker Engine on Debian | Docker Documentation

curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

it shows

E: Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/debian/ bullseye: /etc/apt/keyrings/docker.gpg !=
E: The list of sources could not be read.

what should I do ??

I ran into this problem yesterday. I had to make two changes to the cookbook:

  1. The sudo gpg needs an H-flag:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo -H gpg --dearmor -o /etc/apt/keyrings/docker.gpg

  2. The $(lsb_release -cs) didn’t work for me so I had to hardcode my current ubuntu version:
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu bionic stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Hope this helps. :slight_smile:

1 Like