简体   繁体   English

在ubuntu raring上安装Docker

[英]Docker installation on ubuntu raring

Sorry for this newbie question... :) 对不起这个新手问题...... :)

I have tried several time to install docker on my linux raring machine but never I succeed to do it correctly. 我已经尝试了几次在我的linux raring机器上安装docker,但从来没有我成功地做到这一点。 I am sure this something simple that I should have done but still I don't find it ! 我确信这应该是我应该做的简单但仍然没有找到它!

I have followed the tutorial : 我按照教程:

http://docs.docker.io/en/latest/installation/ubuntulinux/#ubuntu-raring http://docs.docker.io/en/latest/installation/ubuntulinux/#ubuntu-raring

but when I try to use the command : 但是当我尝试使用命令时:

sudo apt-get install lxc-docker sudo apt-get install lxc-docker

I get the following error : 我收到以下错误:

"Not possible to find the package lxc-docker" “找不到包lxc-docker”

so when I try the command : curl http://get.docker.io | sudo sh 所以当我尝试命令时: curl http://get.docker.io | sudo sh curl http://get.docker.io | sudo sh

I get : 我明白了:

I hajeangui@jeangui-portable:/usr/local/bin$ curl http://get.docker.io | sudo sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1834  100  1834    0     0   2353      0 --:--:-- --:--:-- --:--:--  3869
Ensuring basic dependencies are installed...
Looking in /proc/filesystems to see if we have AUFS support...
Found.
Downloading docker binary to /usr/local/bin...
Upstart script already exists.
Starting dockerd...
Done.

But when I run : sudo docker 但是当我跑: sudo docker

I get this exception : Impossible to launch binary file docker. 我得到了这个例外:无法启动二进制文件docker。

I have tried to purge the lxc-docker package but it seems not to be installed... 我试图清除lxc-docker包但似乎没有安装...

I don't understand. 我不明白。

Help help :) please. 请帮助:)

cheers Jeangui 真三国欢呼

The order of commands should be: 命令的顺序应该是:

sudo sh -c "curl https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker

That is, you first need to add the key for the personal package archive (ppa) and then add that archive to your apt sources. 也就是说,首先需要为个人包存档(ppa)添加密钥,然后将该存档添加到apt源。

Please see http://docs.docker.io/en/latest/installation/ubuntulinux/#ubuntu-raring-13-04-64-bit 请参阅http://docs.docker.io/en/latest/installation/ubuntulinux/#ubuntu-raring-13-04-64-bit

I had the same problem you need to understand it that Docker only works for 64 bit Ubuntu OS. 我有同样的问题你需要了解它Docker只适用于64位Ubuntu操作系统。

sudo apt-get update
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
sudo reboot
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker

But it will show you error 但它会告诉你错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package lxc-docker

You will get image of 64 bit and your OS is 32 bit the it won't go and read the image, That why error coming out 你将得到64位的图像,你的操作系统是32位,它不会去读取图像,这就是为什么错误出来

Follow the following steps 请执行以下步骤

> sudo apt update 
> sudo apt install apt-transport-https ca-certificates curl software-properties-common
> sudo sh -c "echo deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable > /etc/apt/sources.list.d/docker.list" 
> curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
> sudo apt update 
> sudo apt install docker-ce

If you are still facing error refer this blog Install Docker on Ubuntu, RHEL/CentOS 7 and Windows 10 如果您仍然面临错误,请参阅此博客在Ubuntu,RHEL / CentOS 7和Windows 10上安装Docker

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM