Ich folge der offiziellen Docker-Installationsanleitung für Docker-ce unter Ubuntu.
Wenn ich zu Sudo apt install docker-ce
komme, bekomme ich 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
[email protected]:~/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
Mein erster Gedanke war, dass Docker noch kein Paket für Bionic veröffentlicht hat (es ist sehr neu), aber als ich nach "install docker-ce ubuntu 18.04" suchte, fand ich eine Anleitung, die 18.04 spezifisch zu sein scheint und im Grunde nur genau die gleichen Anweisungen gibt - Schlagen Sie vor, dass es zumindest für den Autor funktioniert hat:
https://linuxconfig.org/how-to-install-docker-on-ubuntu-18-04-bionic-beaver
Hat jemand eine Idee, warum das bei mir nicht funktioniert?
Aus demselben Handbuch, auf das Sie verwiesen haben, können Sie jetzt stattdessen das Repository für 17.10 verwenden:
deb [Arch=AMD64] https://download.docker.com/linux/ubuntu artful stable
Und alle docker-ce
abhängigen Pakete werden aus dem ubuntu bionic
-Repository aufgelöst. Überprüfen Sie die Docker-Dokumentation für weitere Informationen. Keine Kompatibilitätsprobleme zu befürchten :)
Docker 18.06 wurde auf das Repository bionic
aktualisiert. Diese Problemumgehung ist nicht mehr erforderlich!
Führen Sie dies aus, wenn Sie den docker-ce
auf Ubuntu 18.04
installieren möchten:
Sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | Sudo apt-key add -
Sudo add-apt-repository "deb [Arch=AMD64] https://download.docker.com/linux/ubuntu bionic test"
Sudo apt update
Sudo apt install docker-ce
Um zu überprüfen, ob die Installation erfolgreich beendet wurde, führen Sie einfach Folgendes aus:
docker -v
sollte ausgeben:
Docker version 18.06.1-ce, build e68fc7a
Einige der Führer sprangen die Waffe; docker-ce ist noch nicht für Ubuntu 18.04 verfügbar. Sie können die Liste der unterstützten Versionen überprüfen hier .
Dieselbe Anleitung, die Sie mit der vorgeschlagenen Installation von docker.io verlinkt haben; das habe ich getan Es ist eine Problemumgehung, bis Docker-CE 18.04 unterstützt.
Die folgenden Schritte hier in der Docker-Dokumentation haben bei mir funktioniert. Ich musste nur stable
in test
in diesem Befehl ändern
Sudo add-apt-repository \
"deb [Arch=AMD64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Ich hatte das gleiche Problem. So habe ich es behoben:
$ Sudo snap install docker
$docker -v
Docker version 18.06.1-ce, build e68fc7a
$Sudo docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.4
Git commit: e68fc7a
Built: Tue May 7 18:01:43 2019
OS/Arch: linux/386
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.4
Git commit: e68fc7a
Built: Tue May 7 18:01:44 2019
OS/Arch: linux/386
Snap-Paket von Docker wird leicht auf Ubuntu 19.04 (Disco) installiert werden können und es hat bei mir funktioniert.
Lesen Sie hier die Dokumentation dazu:
https://github.com/docker/docker-snap