由于某些原因,运行后我无法从Docker容器中分离出来docker attach <container>。该文档说要使用Ctrl-p, Ctrl-q,但似乎不起作用。我也尝试了ctrl-q + ctrl-p(组合,而不是按顺序)和ctrl-shift-q, ctrl-shift-p和ctrl-shift-q + ctrl-shift-p。例如,即使设置分离键--detach-keys="p"也不会从容器分离。
此外,其他事情似乎不起作用。例如,根据文档,ctrl-c应使连接的容器停止并脱离。但是,我无法ctrl-c在任何容器上工作。ctrl-q但是,与不同,它ctrl-c按预期方式提供反馈,^C并在终端中显示a 。
我已经注意到,由于某种原因,当我按时ctrl-p,会^P在终端中显示a,但是按ctrl-q或ctrl-shift-q不会显示终端反馈。
任何人都可以猜测为什么会发生这种情况吗?
如果重要的话,我在MacOS上使用iTerm2。此外,有问题的容器还通过发射docker-compose。
编辑:为清楚起见,我docker-compose up在以下compose文件上启动了我的容器:
version: '3'
services:
test:
build:
context: .
dockerfile: Dockerfile
container_name: container-test
ports:
- "5050:5050"
Run Code Online (Sandbox Code Playgroud)
然后我使用附加:
$ docker attach container-test
Run Code Online (Sandbox Code Playgroud)
编辑2:经过一些测试,我可以确认MacOS终端中仍然存在此问题。
基本上,我所做的就是启动一个新的 Angular 项目并将其加载到工作区中。由于此错误,VS Code 似乎无法执行任何 linting 或代码感知。它正在吐出以下错误数据:
{
"resource": "/Users/<snip!>/angular-project/src/app/app.module.ts",
"owner": "typescript",
"code": "2354",
"severity": 8,
"message": "This syntax requires an imported helper but module 'tslib' cannot be found.",
"source": "ts",
"startLineNumber": 13,
"startColumn": 1,
"endLineNumber": 26,
"endColumn": 3
}
Run Code Online (Sandbox Code Playgroud)
我在某处发现了一个旧错误,说moduleResolution必须tsconfig.json设置为node,但 Angular CLI 已经为我做到了这一点......
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": …Run Code Online (Sandbox Code Playgroud) node.js single-page-application typescript visual-studio-code angular
是否有使用GSUTIL的命令允许我公开分享特定Bucket中的所有内容?现在,我被迫通过控制台中的每个单一文件单独检查"共享".
我有一张要从SVG文件加载的图片。但是,我mime.types在Nginx服务器上的文件中存在正确的行:
...
image/svg+xml svg svgz;
...
Run Code Online (Sandbox Code Playgroud)
当我尝试下载文件时,服务器说这是纯文本:
$ wget -O - -S http://172.22.253.119:2998/tw-logo-on-dark-2.svg > /dev/null
--2018-06-26 09:05:06-- http://172.22.253.119:2998/tw-logo-on-dark-2.svg
Connecting to 172.22.253.119:2998... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx/1.13.12
Date: Tue, 26 Jun 2018 14:05:06 GMT
Content-Type: text/plain
Content-Length: 26706
Last-Modified: Mon, 25 Jun 2018 16:05:40 GMT
Connection: keep-alive
ETag: "5b3112d4-6852"
Accept-Ranges: bytes
Length: 26706 (26K) [text/plain]
Saving to: ‘STDOUT’
Run Code Online (Sandbox Code Playgroud)
谁能告诉我我在做什么错?