账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    docker 在commit -a 的那个用户信息如何能看到?
    37
    0
    root@miaowo:~# docker commit -m 'install openssh' -a 'stephen2019' 86c2edf93b3c newsshd:latest
    sha256:3999519f240ac54638cc154b8beed9e81566933dcd9a4511c5c2bd33954c2ada
    root@miaowo:~# docker images
    REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
    newsshd                      latest              3999519f240a        9 seconds ago       1.33GB
    sshd                         v1                  c5d35068dc0e        15 hours ago        1.33GB
    stephen2019token/python3.7   latest              1e071b1fc2a7        41 hours ago        1.25GB
    python3.7                    latest              e52ec33a8c8c        7 weeks ago         1.16GB
    centos                       latest              9f38484d220f        5 months ago        202MB
    root@miaowo:~# docker images -a
    REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
    newsshd                      latest              3999519f240a        15 seconds ago      1.33GB
    <none>                       <none>              6e7af4363cdf        14 hours ago        1.33GB
    sshd                         v1                  c5d35068dc0e        15 hours ago        1.33GB
    stephen2019token/python3.7   latest              1e071b1fc2a7        41 hours ago        1.25GB
    python3.7                    latest              e52ec33a8c8c        7 weeks ago         1.16GB
    centos                       latest              9f38484d220f        5 months ago        202MB
    root@miaowo:~# docker ps -l
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    86c2edf93b3c        6e7af4363cdf        "bash"              2 hours ago         Up 2 hours                              inspiring_davinci
    root@miaowo:~# docker images -a
    REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
    newsshd                      latest              3999519f240a        55 seconds ago      1.33GB
    <none>                       <none>              6e7af4363cdf        14 hours ago        1.33GB
    sshd                         v1                  c5d35068dc0e        15 hours ago        1.33GB
    stephen2019token/python3.7   latest              1e071b1fc2a7        41 hours ago        1.25GB
    python3.7                    latest              e52ec33a8c8c        7 weeks ago         1.16GB
    centos                       latest              9f38484d220f        5 months ago        202MB
    root@miaowo:~# docker images -f
    flag needs an argument: 'f' in -f
    See 'docker images --help'.
    root@miaowo:~# docker images 
    REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
    newsshd                      latest              3999519f240a        4 minutes ago       1.33GB
    sshd                         v1                  c5d35068dc0e        15 hours ago        1.33GB
    stephen2019token/python3.7   latest              1e071b1fc2a7        41 hours ago        1.25GB
    python3.7                    latest              e52ec33a8c8c        7 weeks ago         1.16GB
    centos                       latest              9f38484d220f        5 months ago        202MB
    root@miaowo:~# 
    

    我查案镜像的时候看不到这个-a提交的那个参数?

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 10 元积分
        全部回答
    • 0
    • 旧城あい似梦 普通会员 1楼

      在Docker中,commit -a 的命令用于提交更改,这个选项将提交所有更改,包括提交信息。如果您在提交更改时想要包含用户的密码,那么您可以使用以下命令:

      bash docker commit -a "username:password" image_name [container_name]

      在这个命令中,"username:password" 是提交信息,image_name 是要提交的镜像名称,container_name 是要提交的容器名称。如果您想要包含用户的密码,那么请将 username 替换为实际的用户名,将 password 替换为实际的密码。

      请注意,提交密码需要您具有足够的权限。在使用 docker commit -a 时,请确保您具有相应的权限。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部