Docker Community Forums

Share and learn in the Docker community.

Why can't set add-apt-repository when install Docker EE?

This post was flagged by the community and is temporarily hidden.

sudo add-apt-repository \
   "deb [arch=$(dpkg --print-architecture)] $DOCKER_EE_URL/ubuntu \
   $(lsb_release -cs) \
   stable-$DOCKER_EE_VERSION"

$(lsb_release -cs) returns focal. The repo does not cover Ubuntu focal yet. You need to use bionic instead. Edit the repo configuration and replace focal with bionic (Ubuntu 18.04) and you should be good to go. Be aware this is not a supported configuration. If you want to run Docker EE in a supported configuration, you will need to downgrade your OS to Ubuntu 18.04.

If the repo was not registered before try:

sudo add-apt-repository \
   "deb [arch=$(dpkg --print-architecture)] $DOCKER_EE_URL/ubuntu \
   bionic \
   stable-$DOCKER_EE_VERSION"

Thank you for your answer. It works now!
Another question, I installed it on the OS directly.
When I run ucp container, got this error:

sudo docker image pull docker/ucp:3.2.6

sudo docker container run --rm -it --name ucp \
  -v /var/run/docker.sock:/var/run/docker.sock \
  docker/ucp:3.2.6 install \
  --host-address 127.0.0.1 \
  --interactive
INFO[0000] Your Docker daemon version 19.03.5, build 2ee0c57608 (5.4.0-31-generic) is compatible with UCP 3.2.6 (04ac981) 
Admin Username: user
Admin Password: 
Confirm Admin Password: 
WARN[0012] None of the Subject Alternative Names we'll be using in the UCP certificates ["user"] contain a domain component. Your generated certs may fail TLS validation unless you only use one of these shortnames or IP addresses to connect. You can use the --san flag to add more aliases 

You may enter additional aliases (SANs) now or press enter to proceed with the above list.
Additional aliases: 
INFO[0014] Checking required ports for connectivity     
FATA[0071] unable to verify host port connectivity: unable to verify required UCP ports: the following required ports are blocked on your host: 179, 443, 2376, 6443, 6444, 10250, 12376, 12378 - 12386, 12388.  Check your firewall settings

I did this but also got the same message

$ sudo iptables -F && sudo systemctl restart docker.service

Can’t I use http://127.0.0.1 to use the ucp? Is the SSL/TLS necessary?

Not sure. I never operated a Docker Enterprise environment outside a private cloud setup…

Though, from what I remember UCP is going to create its own certificates if you don’t provide any during installation.

Thank you for your help.