ubuntu docker 安装
Install Docker on UbuntuEstimated reading time:17 minutes Docker is supported on these Ubuntu operating systems:
This page instructs you to install Docker on Ubuntu,using packages provided by Docker. Using these packages ensures you get the latest official release of Docker. If you are required to install using Ubuntu-managed packages,consult the Ubuntu documentation. Some files and commands may be different if you use Ubuntu-managed packages.
PrerequisitesDocker has two important installation requirements:
Update your apt sourcesTo set
Prerequisites by Ubuntu VersionUbuntu Xenial 16.04 (LTS),Wily 15.10,Trusty 14.04 (LTS)For Ubuntu Trusty,Wily,and Xenial,install the To install the
Ubuntu Precise 12.04 (LTS)For Ubuntu Precise,Docker requires the 3.13 kernel version. If your kernel version is older than 3.13,you must upgrade it. Refer to this table to see which packages are required for your environment: To upgrade your kernel and install the additional packages,do the following:
Install the latest versionMake sure you have satisfied all theprerequisites,then follow these steps.
Note: For production systems,it is recommended that youinstall a specific versionso that you do not accidentally update Docker. You should plan upgrades for production systems carefully. Log into your Ubuntu installation as a user with Update your Install Docker. $sudoapt-getinstalldocker-engine Start the $sudoservicedockerstart Verify that $sudodockerrunhello-world This command downloads a test image and runs it in a container. When the container runs,it prints an informational message and exits. |
docker-engine:
List all available versions using
apt-cache madison:$apt-cachemadisondocker-enginedocker-engine|1.12.3-0~xenial|https://apt.dockerproject.org/repoubuntu-xenial/mainamd64Packages docker-engine|1.12.2-0~xenial|https://apt.dockerproject.org/repoubuntu-xenial/mainamd64Packages docker-engine|1.12.1-0~xenial|https://apt.dockerproject.org/repoubuntu-xenial/mainamd64Packages docker-engine|1.12.0-0~xenial|https://apt.dockerproject.org/repoubuntu-xenial/mainamd64Packages docker-engine|1.11.2-0~xenial|https://apt.dockerproject.org/repoubuntu-xenial/mainamd64Packages docker-engine|1.11.1-0~xenial|https://apt.dockerproject.org/repoubuntu-xenial/mainamd64Packages docker-engine|1.11.0-0~xenial|https://apt.dockerproject.org/repoubuntu-xenial/mainamd64Packages
The second field is the version string. To install exactly
1.12.0-0~xenial,append it after the package name in theapt-get installcommand,separated from the package name by an equals sign (=).bash $ sudo apt-get install docker-engine=1.12.0-0~xenialIf you already have a newer version installed,you will be prompted to downgrade Docker. Otherwise,the specific version will be installed.
Follow steps 4 and 5 ofInstall the latest version.
Install a pre-release versionIf you want to test Docker on Ubuntu,on a non-production system,follow these steps. To install a stable released version of Docker afterward,you will need to revert to the previous configuration.
Edit/etc/apt/sources.list.d/docker.list.
$sudonano/etc/apt/sources.list.d/docker.list
Changemaintotestingat the end of the top line. Save and close the file.
Update the package list.
$sudoapt-getupdate
List the available testing versions.
$sudoapt-cachemadisondocker-engine
Install a specific version following the same procedure asInstall a specific version.
Optional configurationsThis section contains optional procedures for configuring Ubuntu to work better with Docker.
Manage Docker as a non-root user
Adjust memory and swap accounting
Enable UFW forwarding
Configure a DNS server for use by Docker
-
(编辑:安卓应用网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
Edit/etc/apt/sources.list.d/docker.list.
$sudonano/etc/apt/sources.list.d/docker.list
Changemaintotestingat the end of the top line. Save and close the file.
Update the package list.
$sudoapt-getupdate
List the available testing versions.
$sudoapt-cachemadisondocker-engine
Install a specific version following the same procedure asInstall a specific version.
Manage Docker as a non-root user
Adjust memory and swap accounting
Enable UFW forwarding
Configure a DNS server for use by Docker
-
(编辑:安卓应用网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
