Ubuntu16.04运行docke容器

Posted Jacob_tian

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu16.04运行docke容器相关的知识,希望对你有一定的参考价值。

  1. 配置静态ip及DNS

sodu vim /etc/network/interfaces

auto ens32

iface ens32 inet static

address 10.0.0.111

netmask 255.255.255.0

gateway 10.0.0.2

/etc/init.d/networking restart

vi /etc/resolv.conf

nameserver 10.0.0.2

nameserver 8.8.8.8

  1. 允许root登录

vim /etc/ssh/sshd_config

PermitRootLogin yes

/etc/init.d/ssh restat

  1. 配置apt源

mv /etc/apt/sources.list /etc/apt/sources.list.bak

vi /etc/apt/sources.list

deb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse

apt-get update

以上是关于Ubuntu16.04运行docke容器的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu 16.04中的Dock的应用顺序调整

ubuntu docker 安装

Docker之从零开始制作docker镜像

Ubuntu 16.04安装Meld文件比对工具替代Beyond Compare

验证在 Docker 容器中运行的 ubuntu 版本

Ubuntu 16.04配置SSL免费证书