TCP/IP 实验环境搭建 一 (软件安装)

tcp/ip 实验环境搭建,参考极客时间,大神刘超。

系统环境 ubuntu18.04 桌面版

  1. 安装 docker 软件
apt-get remove docker docker-engine docker.io
apt-get -y update
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg > gpg
apt-key add gpg
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get -y update
apt-cache madison docker-ce
apt-get -y install docker-ce

2.安装 Open vSwitch

apt-get -y install openvswitch-common openvswitch-dbg openvswitch-switch python-openvswitch  openvswitch-pki 
apt-get -y install bridge-utils
apt-get -y install arping

效果图


image.png
  1. 将当前用户 加入 docker 组
sudo groupadd docker
sudo usermod -aG docker $USER
reset

效果图


image.png
  1. docker 镜像下载
    a. 制作Dockerfile 文件
FROM hub.c.163.com/public/ubuntu:14.04                                                                                                                            
RUN apt-get -y update && apt-get install -y iproute2 iputils-arping net-tools tcpdump curl telnet iputils-tracepath traceroute
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
ENTRYPOINT /usr/sbin/sshd -D

b. 构建镜像。(. 表示 Dockerfile 文件在当前目录)

docker image build -t hub.c.163.com/public/ubuntu:14.04  .

效果图如下


image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 转载自 http://blog.opskumu.com/docker.html 一、Docker 简介 Docke...
    极客圈阅读 10,532评论 0 120
  • Docker — 云时代的程序分发方式 要说最近一年云计算业界有什么大事件?Google Compute Engi...
    ahohoho阅读 15,619评论 15 147
  • docker基本概念 1. Image Definition 镜像 Image 就是一堆只读层 read-only...
    慢清尘阅读 8,815评论 1 21
  • 减肥,依稀记得是在大学毕业后才有过的想法,大学胖的惨不忍睹,但是不懂事不知道这样很丑,因为身边总有一些损友告诉你你...
    谢小妖阅读 195评论 1 0
  • 一、被误解的“山竹” 后来,才体会到原来是不想让我带太多东西回家,心疼路上太累。虽然现在网购如此方便,但宁愿路上累...
    犟心独运阅读 281评论 0 1