docker安装 日志 docker 安装入门

Xshell 5 (Build 0835)
Copyright (c) 2002-2015 NetSarang Computer, Inc. All rights reserved.

Type `help' to learn how to use Xshell prompt.
[d:\~]$ 

Connecting to 123.207.8.242:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Last login: Tue Oct 23 17:25:51 2018 from 139.199.160.47
[root@VM_1_64_centos ~]# docker -v
Docker version 1.13.1, build 8633870/1.13.1
[root@VM_1_64_centos ~]# service docker start
Redirecting to /bin/systemctl start  docker.service
[root@VM_1_64_centos ~]# service docker start
Redirecting to /bin/systemctl start  docker.service
[root@VM_1_64_centos ~]# chkconfig docker on
Note: Forwarding request to 'systemctl enable docker.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@VM_1_64_centos ~]# echo "OPTIONS='--registry-mirror=https://mirror.ccs.tencentyun.com'" >> /etc/sysconfig/docker
[root@VM_1_64_centos ~]# systemctl daemon-reload
[root@VM_1_64_centos ~]# service docker restart
Redirecting to /bin/systemctl restart  docker.service
[root@VM_1_64_centos ~]# docker pull centos
Using default tag: latest
Trying to pull repository docker.io/library/centos ... 
sha256:67dad89757a55bfdfabec8abd0e22f8c7c12a1856514726470228063ed86593b: Pulling from docker.io/library/centos
aeb7866da422: Pull complete 
Digest: sha256:67dad89757a55bfdfabec8abd0e22f8c7c12a1856514726470228063ed86593b
Status: Downloaded newer image for docker.io/centos:latest
[root@VM_1_64_centos ~]# ls
[root@VM_1_64_centos ~]# ll
total 0
[root@VM_1_64_centos ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
docker.io/centos    latest              75835a67d134        13 days ago         200 MB
[root@VM_1_64_centos ~]# docker run -it centos /bin/bash
[root@7806f60c4084 /]# 
[root@7806f60c4084 /]# 
[root@7806f60c4084 /]# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          50G  2.1G   45G   5% /
tmpfs           497M     0  497M   0% /dev
tmpfs           497M     0  497M   0% /sys/fs/cgroup
/dev/vda1        50G  2.1G   45G   5% /etc/hosts
shm              64M     0   64M   0% /dev/shm
tmpfs           497M     0  497M   0% /proc/acpi
tmpfs           497M     0  497M   0% /proc/scsi
tmpfs           497M     0  497M   0% /sys/firmware
[root@7806f60c4084 /]# mkdir -p /data/simple_docker
[root@7806f60c4084 /]# ls /data
simple_docker
[root@7806f60c4084 /]# exit
exit
[root@VM_1_64_centos ~]# ls /data
[root@VM_1_64_centos ~]# ls /data
[root@VM_1_64_centos ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS                      PORTS               NAMES
7806f60c4084        centos              "/bin/bash"         About a minute ago   Exited (0) 20 seconds ago                       eloquent_easley
[root@VM_1_64_centos ~]# docker commit -m="备注" 你的CONTAINER_ID 你的IMAGE
invalid reference format
[root@VM_1_64_centos ~]# docker commit -m="备注"
"docker commit" requires at least 1 and at most 2 argument(s).
See 'docker commit --help'.

Usage:  docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

Create a new image from a container's changes
[root@VM_1_64_centos ~]# ls /data
[root@VM_1_64_centos ~]# docker commit -m="备注111"
"docker commit" requires at least 1 and at most 2 argument(s).
See 'docker commit --help'.

Usage:  docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

Create a new image from a container's changes
[root@VM_1_64_centos ~]# 
 

转载于:https://my.oschina.net/thomas2/blog/2251400

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值