如何在Docker中获取Docker容器ID?(How to get docker container ID within Docker?)
我试图按照这里的说明运行Jupyter Notebook,它不是预构建的Docker容器的一部分。
为了得到包含id,我在Docker Quickstart Terminal中做了这个,当笔记本服务器用Ctrl + C终止时(笔记本服务器运行时没有响应),我得到了
$ docker ps -lq 0a8f14a15b4f
然后我做到了
$ docker exec -it 0a8f14a15b4f bash Error response from daemon: Container 0a8f14a15b4f357352f3c40b6d449e1d9150a0ce79 5fd81c09c00e978ea86163 is not running
那么发生了什么? 我该如何获得容器ID,以便我可以做下面的事情?
docker exec -it [container-id] bash
谢谢!
I am trying to follow the instructions here in order to run a Jupyter Notebook that's not part of a prebuilt Docker container.
In order to get the contain id, I did this in Docker Quickstart Terminal when the notebook server is terminated with Ctrl + C (no response when the notebook server is running), I got
$ docker ps -lq 0a8f14a15b4f
Then I did this
$ docker exec -it 0a8f14a15b4f bash Error response from daemon: Container 0a8f14a15b4f357352f3c40b6d449e1d9150a0ce79 5fd81c09c00e978ea86163 is not running
So, what is going on? How am I supposed to get the container id so that I can do something like below?
docker exec -it [container-id] bash
Thanks!
原文:https://stackoverflow.com/questions/41817649
最满意答案
对此唯一的“解决方法”是使用传统的解析器,它构建了MPS风格的AST。
投影编辑器从各种解析问题中获取MPS(考虑用于C的MPS样式编辑器),代价是无法解析。 每种技术选择都有好处和成本。
The only "workaround" for this is the use of a conventional parser, that builds an MPS-style AST.
The projectional editor gets MPS out of all kinds of parsing troubles (consider an MPS-style editor for C), at the price of not being able to parse. Every technology choice has benefits and costs.
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
针对OpenCL的CUDA MPS?(CUDA MPS for OpenCL?)[2021-11-22]
如果您使用多个不具有事件相关性的OpenCL命令队列,则OpenCL运行时可以通过各个队列的不同工作来保持GPU内核忙碌。 这实际上是否真的发生在真正的实施中。 您需要检查每个供应商的OpenCL指南,看看它们是否支持并发GPU内核。 If you use multiple OpenCL command queues that don't have event interdependencies, an OpenCL runtime could keep the GPU cores busy with va ... -
我在原始文件夹中有文本文件,我想在我的应用程序中使用 我假设“原始文件夹”表示项目中的res/raw/ resource目录。 我不知道如何告诉扫描仪扫描这个特定的文件 那是因为没有档案。 该文件存在于您的开发计算机上。 在运行时表示原始资源就是:原始资源。 在封面下,它实际上是ZIP文件中的条目。 您需要获取原始资源的R.raw值,然后使用getResources().openRawResource()来获取可以传递给Scanner的InputStream 。 除非您针对不同的配置(例如,语言)使用这些原 ...
-
在MPS中运行原始文本文件(Run a raw text file in MPS)[2022-04-29]
对此唯一的“解决方法”是使用传统的解析器,它构建了MPS风格的AST。 投影编辑器从各种解析问题中获取MPS(考虑用于C的MPS样式编辑器),代价是无法解析。 每种技术选择都有好处和成本。 The only "workaround" for this is the use of a conventional parser, that builds an MPS-style AST. The projectional editor gets MPS out of all kinds of parsing tr ... -
在MPS术语中,我们称这些实体不是模型而是“根节点”。 你当然可以生成这样的节点组合 - 我可能会使用预处理脚本来生成六个组合作为引用原始实体的新根节点。 它的概念可能看起来像这样: concept TemporaryCombination extends BaseConcept ... references: page:Page[1] entity:Entity[1] ...然后,TemporaryCombination概念的根映射规则可以驱动目标节点的生成。 In MPS terminology we ...
-
令牌部分是一个身份验证令牌,因此只要该证书集有效(直到您撤销它),它就会起作用。 但是,您仍应将该令牌作为机密管理。 如果您打算与其他人共享此C#程序,则不应与他们共享您的令牌,因为这将使他们能够访问您GitHub帐户的其他部分。 如果要公开共享此文件,则应将其发布到公共CDN或提供访问控制的其他服务。 例如,您可以将带有签名URL的Amazon S3用于每月几美分。 The token part is an auth token so it will work as long as that set of ...
-
当然:有几种方法。 第一个是为MPS定义自定义持久性机制。 这意味着您将能够以MPS打开,编辑和保存文件,保持当前格式。 但是,如果这样做,您将失去MPS的一些灵活性,因为当您扩展语言或将语言与其他语言结合时,您将不得不修改持久性机制。 我建议简单地解析你的文件,构建一个抽象语法树并在MPS中创建相应的节点。 这里有一个教程,展示如何使用ANTLR解析器导入MPS中的文件: http : //tomassetti.me/antlr-and-jetbrains-mps-parsing-files-and-di ...
-
apache ant loadfile任务将允许读取您的文本文件,并将其内容放入app.updatenotes属性中。 你可以简单地使用:
-
据我所知,eclipse并不知道它已更新,所以 Right click on a project -> refresh. 如果这没有帮助尝试 Project -> Clean Problem fixed, it was happening in the Searchable Dictionary (sample application from Android), the fix is simply to increment the database version when it's changed, ...
-
确实你的MPS文件有问题。 RHS部分中的行应该有一个名称,例如 RHS RHS1 K 20.9 RHS1 N 20.9 RHS1 ONE 1 基本上,求解器选择一个RHS集。 类似于RANGES部分。 我不确定您打算使用RANGES部分中的线条。 Indeed your MPS file has a problem. The lines in the RHS section should have one ...