首页 \ 问答 \ Docker:如何获取现有容器的完整容器ID?(Docker: How can I get the complete container id of a existing container?)

Docker:如何获取现有容器的完整容器ID?(Docker: How can I get the complete container id of a existing container?)

我过去几个月一直在学习Docker,我正在观看udemy的一个培训教程。 我做了docker ps -a来检查我拥有的容器(所有这些),为了学习目的,我正在寻找一个命令,它给了我一个容器的完整容器ID。

docker ps -a

让我们说从这张图片中,我想要完整的container_id:8a7815ffd059

提前致谢!


Ive been learning about Docker for the last months, I was watching one training tutorial on udemy. I did docker ps -a to check the containers I have (all of them) and for learning purposes I was looking for a command that gives me the full container id of a container.

docker ps -a

Lets say that from this picture, I want the full container_id of: 8a7815ffd059

thanks in advance!


原文:https://stackoverflow.com/questions/50865183
更新时间:2023-05-20 16:05

最满意答案

使用下面的代码,因为name属性是一个数组

$files = Request::file('collateral_photo');
return $files[0];

或者如果你想要第二个文件

return $files[1];

//if you want to access second file and so on

您需要访问指定了数组索引的文件。

如果要返回整个文件数组本身,请使用

return $files

use the below code, since the name attribute is an array

$files = Request::file('collateral_photo');
return $files[0];

or if you want second file

return $files[1];

//if you want to access second file and so on

you need to access the file with array index specified.

If you want to return the whole files array itself then use

return $files

相关问答

更多
  • 使用GET请求,您将所有数据作为网址的一部分发送。 但是当您使用不属于url的data发送请求时(使用$http的data属性),Angular会在请求有效负载中将请求数据作为JSON发送。 但是,PHP从请求内容类型为x-www-form-urlencoded的url编码的键值对字符串填充POST请求变量。 您可以从Angular以application / x-www-form-urlencoded的形式发送数据 ,但我会坚持使用JSON。 With a GET request, you're send ...
  • 有几种方法可以做到这一点,但最容易理解的是有一个输入字段不属于表的模式。 例如,您可以使用image_file而不是image_cover : echo $this->Form->file('image_file'); 确保在实体的$_accessible字段列表中设置image_file 。 您可以在beforeSave访问此字段,以便存储它。 有这个插件可以完全适合你: https : //github.com/davidyell/CakePHP3-Proffer There are a few w ...
  • 声明行变量 int n, line = 0; std::string value; 适当的加载数据: getline (myfile,value); PA[line] = atof(value.c_str()); cout << PA[line]<< endl; line++; declare line variable int n, line = 0; std::string value; proper load data: getline (myfile,value); PA[line] = at ...
  • 编辑,更新 如何删除上传变量中的特定项? 如果预期结果是文件对象数组将调整从原始files对象拼接数组项的方法 - 并将拼接数组作为上载发送 - 而不是尝试从原始files对象“删除”项目并仍然上载原始files对象。 FileList对象没有.splice()方法。 尝试使用.slice()将files转换为Array ,然后在File对象的数组上调用.splice()方法,例如; // `_files` : `File` object items from original `files` `FileL ...
  • 您可以将其作为参数并将代码修改为 - public static void main(String[] args) { // args[0] - Full path of the file final boolean[][] open = readOpenFromFile(args[0]); print(flow(open)); System.out.println(percolates(open)); } public static boolean[][] readOpe ...
  • 您没有将$mycheck变量传递给view。 替换此行: return View('quiz.check',['quiz'=>$ch,'input'=>$input,'count'=>$count]); 有了这个: return View('quiz.check',['quiz'=>$ch,'input'=>$input,'count'=>$count,'mycheck'=>$mycheck]); 此外,看起来你试图访问变量$q ,这实际上是变量$quiz根据您传递给视图的数据。 You ...
  • 使用下面的代码,因为name属性是一个数组 $files = Request::file('collateral_photo'); return $files[0]; 或者如果你想要第二个文件 return $files[1]; //if you want to access second file and so on 您需要访问指定了数组索引的文件。 如果要返回整个文件数组本身,请使用 return $files use the below code, since the name attribu ...
  • 这是因为: 你打电话request('test') 。 这在Illuminate\Foundation\helpers.php调用了帮助Illuminate\Foundation\helpers.php function request($key = null, $default = null) { ... $value = app('request')->__get($key); ... } 这将调用__get方法以快速获取Illuminate\Http\Request.php ...
  • 继续昨天的评论,如果错误是由于您的代码重新输入造成的,我很抱歉,但这就是您想要尝试按照Jonathan指示的方式剪切和粘贴的全部原因 - 消除转录过程中的人为错误。 我想我明白你的主要问题是什么。 如果您的目标是从stdin读取一些用户输入值,按降序对它们进行排序,然后打开一个文件并按排序顺序将一个附加值读入数组,那么您必须为最终值提供空间声明时声明的数组(如果使用VLA)。 否则,您需要创建足够大的第二个VLA来存储use和文件中的值,并将用户提供的值复制到新数组或最初动态分配数组(使用malloc或ca ...
  • 您可以尝试以下方法或只研究它是如何完成的。 它在我的linux机器上工作正常。 如果您有任何疑问,请告诉我。 #include #include #include const int INITIAL_MAX_LINES = 2; const int MAX_LINES_INC = 2; const int INITIAL_MAX_LINE_LENGTH = 2; const int MAX_LINE_LENGTH_INC = 2; int ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)