小编bbs*_*bbs的帖子

如何SSH到kubernetes集群中的docker容器?

我是Google云平台和Docker的新手,并设置了一个节点集群,制作了一个Dockerfile,用于复制repo并在公共端口上运行Clojure REPL.我可以从我的IDE连接到它并使用我的代码,真棒!

然而,REPL应该通过SSH进行隧道传输,但这是我的问题开始的地方.我找不到一个适合SSH的地方来更改Docker运行REPL的repo:

  • 暴露的IP只暴露了REPL服务(正确的kubernetes术语?)并且不允许我使用SSH.
  • 群集主端点也没有,即使我在这里遵循了Adding or removing SSH keys for all of the instances in your project部分,它也会给我一个公钥错误.

我想通过SSH编辑源文件,但我需要访问docker代码库.我不知道该怎么办.

我知道这不是部署应用程序的典型方式,因此我甚至不确定多个节点是否可以使用修改后的docker代码库(节点是否以某种方式共享JVM?).

具体来说,我的问题是如何通过SSH连接到docker容器来访问代码库?

google-compute-engine docker google-cloud-platform kubernetes google-kubernetes-engine

38
推荐指数
6
解决办法
3万
查看次数

使用dart:web_audio

我有一些困惑调试一些使用Web Audio API的简单应用程序.

在开发者控制台中,我可以这样做:

var ctx = new webkitAudioContext(),
osc = ctx.createOscillator();

osc.connect(ctx.destination);
osc.start(0);
Run Code Online (Sandbox Code Playgroud)

当我尝试使用Dart时尝试使用Dart会产生以下错误:

AudioContext ctx = new AudioContext();
OscillatorNode osc = ctx.createOscillator();

osc.connect(ctx.destination);
osc.start(0);

//Dart2JS: Uncaught TypeError: Object #<OscillatorNode> has no method 'connect$1' 
//DartVM: Class 'OscillatorNode' has no instance method 'connect' with matching
 arguments. NoSuchMethodError: incorrect number of arguments passed to method 
 named connect' Receiver: Instance of 'OscillatorNode'
Run Code Online (Sandbox Code Playgroud)

单步调试我发现connect方法有两种实现方式.所以我试图添加一个额外的第二个参数,因为我无法真正地解决为什么它需要一个名为"输出"的int,想想也许是因为我决定了值1,但是产生了:

//Dart2JS: Uncaught Error: IndexSizeError: DOM Exception 1 flexsynth.html_bootstrap.dart.js:8698 $.main flexsynth.html_bootstrap.dart.js:8698 $$._IsolateContext.eval$1flexsynth.html_bootstrap.dart.js:565 $.startRootIsolate flexsynth.html_bootstrap.dart.js:7181 (anonymous function)

//DartVM: "Dart_IntegerToInt64 expects argument …
Run Code Online (Sandbox Code Playgroud)

dart

3
推荐指数
1
解决办法
309
查看次数