Estoy siguiendo la guía de instalación oficial de Docker para docker-ce en Ubuntu.
Cuando llego sudo apt install docker-ceme sale E: Package 'docker-ce' has no installation candidate:
$ sudo apt-get update
Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
$ sudo apt-get install \
>     apt-transport-https \
>     ca-certificates \
>     curl \
>     software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20180409).
curl is already the newest version (7.58.0-2ubuntu3).
software-properties-common is already the newest version (0.96.24.32.1).
The following NEW packages will be installed
  apt-transport-https
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 1,692 B of archives.
After this operation, 152 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 apt-transport-https all 1.6.1 [1,692 B]
Fetched 1,692 B in 0s (65.4 kB/s)               
Selecting previously unselected package apt-transport-https.
(Reading database ... 116694 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.6.1_all.deb ...
Unpacking apt-transport-https (1.6.1) ...
Setting up apt-transport-https (1.6.1) ...
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
$ sudo apt-key fingerprint 0EBFCD88
pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <[email protected]>
sub   rsa4096 2017-02-22 [S]
$ sudo add-apt-repository \
>    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
>    $(lsb_release -cs) \
>    stable"
Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                    
Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                  
Get:4 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]                                                       
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                               
Fetched 64.4 kB in 0s (141 kB/s)
Reading package lists... Done
robin@xps:~/git/snapcraft.io$ sudo apt-get update
Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease                                      
Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                   
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease                                                                                        
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                
Reading package lists... Done  
$ sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
Lo primero que pensé fue que Docker aún no había lanzado un paquete para Bionic (es muy nuevo), pero cuando busqué "instalar docker-ce ubuntu 18.04" encontré una guía que parece específica para 18.04, y básicamente solo da exactamente las mismas instrucciones - sugiriendo que al menos funcionó para el autor:
https://linuxconfig.org/how-to-install-docker-on-ubuntu-18-04-bionic-beaver
¿Alguien tiene alguna idea de por qué esto podría no funcionar para mí?

sudo apt install docker.iofuncionó para míRespuestas:
De la misma guía a la que hizo referencia, puede usar el repositorio para 17.10 en este momento:
Y todos
docker-celos paquetes dependientes se resolverán desde elbionicrepositorio de ubuntu . Consulte la documentación de Docker para obtener más información. No hay problemas de compatibilidad de los que preocuparse :)Actualización 2018-07-19
Docker 18.06 se ha actualizado al
bionicrepositorio, ¡esta solución alternativa ya no es necesaria!fuente
E: Package 'docker-ce' has no installation candidate➜ ~ docker -v Docker version 18.03.1-ce, build 9ee9f40curl -fsSL get.docker.com | CHANNEL=stable shEjecutar esta opción si desea instalar el
docker-cesobreUbuntu 18.04:Para verificar si la instalación finalizó con éxito, simplemente ejecute:
debería dar salida:
fuente
Ubuntu 19, simplemente cambiebionicen la tercera línea adiscobionicfuncionaría en lugar dediscoen ese caso. Es muy frustrante.-cey-eese eliminan desde ver.18.09.0, así que no hay ningún error por lo que veo. Comprobé mi instalación desde latestcompilación:sudo docker run hello-worldfunciona correctamente. El único problema que veo - 19 ver está en beta. Lo siento por confuso - Sólo segunda semana usando Linux :)Algunos de los guías arrojaron el arma; docker-ce no está disponible para Ubuntu 18.04 todavía. Puede consultar la lista de versiones compatibles aquí .
Esa misma guía que vinculaste sugirió instalar docker.io; Esto es lo que hice. Es una solución alternativa hasta que docker-ce sea compatible con 18.04.
fuente
deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stableSeguir los pasos aquí en la documentación de Docker funcionó para mí. Solo tuve que cambiar
stableatesteste comandofuente
Tuve el mismo problema, así es como lo solucioné:
fuente
El paquete Snap de Docker se instalará fácilmente en Ubuntu 19.04 (Disco) y funcionó para mí.
Consulte la documentación aquí:
https://github.com/docker/docker-snap
fuente