What is the information returned by docker inspect for .Mounts?



  • Ie, if I do:

    $ docker inspect -f '{{ .Mounts }}' base-hostSrcNv
    

    I might get:

    [{bind  /dir/in/container /dir/on/host   true }]
    

    The meaning of /dir/in/container and /dir/on/host is pretty easy to understand. But what's the last boolean value represent?



  • This is the write or read mode on the container. But you can enter this command for more detail in the return:

        docker inspect --format="{{json .Mounts}}" base-hostSrcNv
    

    You can also use jq (apt install jq) tool to have beautiful json output:

        docker inspect --format="{{json .Mounts}}" base-hostSrcNv | jq
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2