CentOS7安装docker运行kali linux镜像

xiaoxiao2021-02-28  120

操作系统版本:CentOS 7.2.1511 yum install docker //安装docker程序 systemctl start docker //启动docker服务 systemctl status docker //查看docker服务状态 ################################################################################# [root@localhost ~]# systemctl status docker ● docker.service - Docker Application Container Engine    Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)    Active: inactive (dead)      Docs: http://docs.docker.com [root@localhost ~]#  [root@localhost ~]# systemctl start docker [root@localhost ~]#  [root@localhost ~]#  [root@localhost ~]# systemctl status docker ● docker.service - Docker Application Container Engine    Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)    Active: active (running) since 三 2017-08-30 21:41:53 CST; 2s ago      Docs: http://docs.docker.com  Main PID: 14325 (dockerd-current)    CGroup: /system.slice/docker.service            ├─14325 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupd...            └─14328 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --metrics-interval... 8月 30 21:41:52 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:52.458046787+08:00" level=info msg="Graph migration to content-addressa...seconds" 8月 30 21:41:52 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:52.460314367+08:00" level=warning msg="mountpoint for pids not found" 8月 30 21:41:52 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:52.461302410+08:00" level=info msg="Loading containers: start." 8月 30 21:41:52 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:52.527311664+08:00" level=info msg="Firewalld running: true" 8月 30 21:41:53 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:53.229185492+08:00" level=info msg="Default bridge (docker0) is assigne...address" 8月 30 21:41:53 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:53.621786297+08:00" level=info msg="Loading containers: done." 8月 30 21:41:53 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:53.622579251+08:00" level=info msg="Daemon has completed initialization" 8月 30 21:41:53 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:53.622639293+08:00" level=info msg="Docker daemon" commit="88a4867/1.12...n=1.12.6 8月 30 21:41:53 localhost.localdomain systemd[1]: Started Docker Application Container Engine. 8月 30 21:41:53 localhost.localdomain dockerd-current[14325]: time="2017-08-30T21:41:53.661771834+08:00" level=info msg="API listen on /var/run/docker.sock" Hint: Some lines were ellipsized, use -l to show in full. docker pull kalilinux/kali-linux-docker //在docker仓库拉取kali镜像 ################################################################################# [root@localhost ~]# docker pull kalilinux/kali-linux-docker  Using default tag: latest Trying to pull repository docker.io/kalilinux/kali-linux-docker ...  latest: Pulling from docker.io/kalilinux/kali-linux-docker b2860afd831e: Pull complete 340395ad18db: Pull complete  d4ecedcfaa73: Pull complete  3f96326089c0: Pull complete e5b4b7133863: Pull complete  45f74187929d: Pull complete  6e61dde25369: Pull complete  96dd93da002c: Pull complete  dae364b40b0d: Pull complete  c680ef1373da: Pull complete  261c33ef5c83: Pull complete  cb8b228855a6: Pull complete  c8f41032911e: Pull complete  Digest: sha256:2ebc75f51fa4937340a0d3b4fe903c60aad23866b8c9e1fae80ad7372e01b71d //查看镜像id [root@localhost ~]# docker images REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE docker.io/kalilinux/kali-linux-docker   latest              8ececeaf404d        6 months ago        1.558 GB docker run -i -t 8ececeaf404d /bin/bash //启动容器并登录到操作系统 ################################################################################# [root@localhost ~]# docker run -i -t 8ececeaf404d /bin/bash root@0f7eff653602:/#  root@0f7eff653602:/#  [root@localhost ~]# docker ps //查看容器已为启动状态 CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES 0f7eff653602        8ececeaf404d        "/bin/bash"         49 seconds ago      Up 44 seconds                           gigantic_torvalds [root@localhost ~]# 
转载请注明原文地址: https://www.6miu.com/read-18467.html

最新回复(0)