1.软文推荐

2.软文推荐

3.软文推荐

目录: 1、Debian11安装docker 2、debian 8 怎么安装Docker 3、debian 9 stretch安装docker Debian11安装docker

获取加速服务方法

需要将当前用户加入 docker 用户组,否则进行相关操作会提示没有权限,也不建议使用 root 身份来操作docker

至此,docker安装完成。

debian 8 怎么安装Docker

一般这类软件官网都有FAQ的。还有看官网的user guide

英文安装过程如下:

Debian

Docker is supported on the following versions of Debian:

Debian testing stretch (64-bit)

Debian 8.0 Jessie (64-bit)

Debian 7.7 Wheezy (64-bit) (backports required)

Note: If you previously installed Docker using APT, make sure you update your APT sources to the new APT repository.

Prerequisites

Docker requires a 64-bit installation regardless of your Debian version. Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor version or a newer maintained version are also acceptable.

Kernels older than 3.10 lack some of the features required to run Docker containers. These older versions are known to have bugs which cause data loss and frequently panic under certain conditions.

To check your current kernel version, open a terminal and use uname -r to display your kernel version:

$ uname -r

Additionally, for users of Debian Wheezy, backports must be available. To enable backports in Wheezy:

Log into your machine and open a terminal with sudo or root privileges.

Open the /etc/apt/sources.list.d/backports.list file in your favorite editor.

If the file doesn’t exist, create it.

Remove any existing entries.

Add an entry for backports on Debian Wheezy.

An example entry:

deb wheezy-backports main

Update package information:

$ apt-get update

Update your apt repository

Docker’s APT repository contains Docker 1.7.1 and higher. To set APT to use from the new repository:

If you haven’t already done so, log into your machine as a user with sudo or root privileges.

Open a terminal window.

Purge any older repositories.

$ apt-get purge "lxc-docker*"

$ apt-get purge "docker.io*"

Update package information, ensure that APT works with the https method, and that CA certificates are installed.

$ apt-get update

$ apt-get install apt-transport-https ca-certificates

Add the new GPG key.

$ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Open the /etc/apt/sources.list.d/docker.list file in your favorite editor.

If the file doesn’t exist, create it.

Remove any existing entries.

Add an entry for your Debian operating system.

The possible entries are:

Note: Docker does not provide packages for all architectures. To install docker on a multi-architecture system, add an [arch=...] clause to the entry. Refer to the Debian Multiarch wiki for details.

On Debian Wheezy

deb debian-wheezy main

On Debian Jessie

deb debian-jessie main

On Debian Stretch/Sid

deb debian-stretch main

Save and close the file.

Update the APT package index.

$ apt-get update

Verify that APT is pulling from the right repository.

$ apt-cache policy docker-engine

From now on when you run apt-get upgrade, APT pulls from the new apt repository.

Install Docker

Before installing Docker, make sure you have set your APT repository correctly as described in the prerequisites.

Update the APT package index.

$ sudo apt-get update

Install Docker.

$ sudo apt-get install docker-engine

Start the docker daemon.

$ sudo service docker start

Verify docker is installed correctly.

$ sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message. Then, it exits.

Giving non-root access

The docker daemon always runs as the root user and the docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root, and so, by default, you can access it with sudo.

If you (or your Docker installer) create a Unix group called docker and add users to it, then the docker daemon will make the ownership of the Unix socket read/writable by the docker group when the daemon starts. The docker daemon must always run as the root user, but if you run the docker client as a user in thedocker group then you don’t need to add sudo to all the client commands. From Docker 0.9.0 you can use the -G flag to specify an alternative group.

Warning: The docker group (or the group specified with the -G flag) is root-equivalent; see Docker Daemon Attack Surface details.

Example:

# Add the docker group if it doesn't already exist.

$ sudo groupadd docker

# Add the connected user "${USER}" to the docker group.

# Change the user name to match your preferred user.

# You may have to logout and log back in again for

# this to take effect.

$ sudo gpasswd -a ${USER} docker

# Restart the Docker daemon.

$ sudo service docker restart

Upgrade Docker

To install the latest version of Docker with apt-get:

$ apt-get upgrade docker-engine

Uninstall

To uninstall the Docker package:

$ sudo apt-get purge docker-engine

To uninstall the Docker package and dependencies that are no longer needed:

$ sudo apt-get autoremove --purge docker-engine

The above commands will not remove images, containers, volumes, or user created configuration files on your host. If you wish to delete all images, containers, and volumes run the following command:

$ rm -rf /var/lib/docker

You must delete the user created configuration files manually.

如果你用apt 请先更新apt 

docker 支持64位debain .内核最低必须是3.10的。

可以用 uname -r 命令查看系统和内核版本debian 9 stretch安装docker

1.卸载历史docker

sudo apt-get remove docker docker-engine docker.io

2. 更新apt-get源

sudo apt-get update

3.安装软件包让apt支持HTTPS

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common

4.添加docker官方GPG KEY

curl -fsSL (. /etc/os-release;echo"$ID")/gpg | sudo apt-key add -

5.指纹验证

sudo apt-key fingerprint 0EBFCD88

是否是:9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88

6.添加apt镜像仓库

x86_64 :

sudo add-apt-repository"deb [arch=amd64] (. /etc/os-release;echo"$ID")$(lsb_release -cs)stable"

armhf :

echo"deb [arch=armhf] (. /etc/os-release;echo"$ID")$(lsb_release -cs)stable"|sudo tee /etc/apt/sources.list.d/docker.list

7.安装docker CE(Docker 从 17.03版本之后分为 CE(Community Edition) 和 EE(Enterprise Edition))

sudo apt-get update

sudo apt-get install docker-ce

相关文章 8

1

英国原生ip服务器(英国ip地址和端口) 2分钟前

目录:1、关于英国IP服务器2、全世界的十台根DNS服务器的IP地址分别是哪几个?3、iepl专线是原生ip么关于英国IP服务器 商业,说白了就是收...

2

网络摄像头与服务器(网络摄像头服务器搭建) 3分钟前

目录:1、无线监控怎么连接电脑?2、利用网络摄像机做监控时,还需要网络视频服务器吗?如果用,视频服务器是用来做什么的?3、无线网...

3

淘宝链接标题如何优化(淘宝链接标题改动影响大吗) 5分钟前

目录:1、淘宝怎么优化标题2、淘宝店铺运营做好标题优化的技巧!3、淘宝如何做好标题优化4、淘宝标题优化技巧步骤 淘宝标题优化技巧步...

4

linux一键安装系统(linux一键安装windows) 6分钟前

目录:1、linux怎么一键安装txt中的环境2、linux 系统下能用一键ghost安装window7吗?3、Linux安装基本命令4、linux怎样一键安装web环境php+apache+...

5

pbootcms安装教程(pbootcms怎么样) 7分钟前

目录:1、pbootcms如何插入登入系统2、pbootCMS怎么使用?3、phpenv可以安装pbootcms吗4、pbootcms程序怎么安装在阿里云主机上pbootcms如何插入登入系...

6

上海兼职关键词优化(上海网页关键词优化介绍) 10分钟前

目录:1、急求上海seo优化专业人员, 对于百度收录 排名 权重有经验的留个联系方式!2、头条词条优化兼职每个月收入3、上海关键词优化...

7

php.ini怎么设置(phpini配置) 12分钟前

目录:1、PHP怎么设置PHP.INI文件的参数?2、FastCGI如何自定义php.ini文件3、php5修改php.ini的设置问题!4、php.ini如何配置?5、在php.ini中如何配...

8

5118网站优惠码(5118会员优惠码) 13分钟前

目录:1、网站优化排名软件2、5118站长工具手机怎么注册?3、怎样分析竞争对手的SEO操作实践情况4、淘金阁和5118网这类网站怎么样?5、51...