我在我的Ubuntu 13.10(Saucy Salamander)上安装了Docker,当我输入我的控制台时:
sudo docker pull busybox
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Pulling repository busybox
2014/04/16 09:37:07 Get https://index.docker.io/v1/repositories/busybox/images: dial tcp: lookup index.docker.io on 127.0.1.1:53: no answer from server
Run Code Online (Sandbox Code Playgroud)
Docker版本:
$ sudo docker version
Client version: 0.10.0
Client API version: 1.10
Go version (client): go1.2.1
Git commit (client): dc9c28f
Server version: 0.10.0
Server API version: 1.10
Git commit (server): dc9c28f
Go version (server): go1.2.1
Last stable version: 0.10.0
Run Code Online (Sandbox Code Playgroud)
我在没有身份验证的代理服务器后面,这是我的/etc/apt/apt.conf
文件:
Acquire::http::proxy "http://192.168.1.1:3128/";
Acquire::https::proxy "https://192.168.1.1:3128/";
Acquire::ftp::proxy "ftp://192.168.1.1:3128/";
Acquire::socks::proxy "socks://192.168.1.1:3128/";
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我有自定义组件:
@Component({
selector: 'my-custom-component',
templateUrl: './my-custom-component.html',
styleUrls: ['./my-custom-component.css']
})
export class MyCustomComponent {
constructor() {
console.log('myCustomComponent');
}
}
Run Code Online (Sandbox Code Playgroud)
我可以像这样使用它:
<my-custom-component></my-custom-component>
Run Code Online (Sandbox Code Playgroud)
但我怎么能传递一个变量呢?例如:
<my-custom-component custom-title="My Title"></my-custom-component>
Run Code Online (Sandbox Code Playgroud)
并在我的组件代码中使用它?
我正在使用Symfony2和:
我在routing.yml中有这个
_welcome:
resource: "@AcmeBundle/Controller/"
type: annotation
Run Code Online (Sandbox Code Playgroud)
我在控制器中的这个方法:
/**
* @Route("/{page}")
*/
public function staticAction($page)
{
return $this->render('AcmeBundle:Static:'.$page.'.html.twig');
}
Run Code Online (Sandbox Code Playgroud)
要生成常用页面:
/home
/contact
/privacy
Run Code Online (Sandbox Code Playgroud)
但是当我在菜单上创建网址时:
<a href="{{ path('_welcome', {'page': 'home'}) }}">Home</a>
<a href="{{ path('_welcome', {'page': 'contact'}) }}">Contact</a>
<a href="{{ path('_welcome', {'page': 'privacy'}) }}">Privacy</a>
Run Code Online (Sandbox Code Playgroud)
而我Symfony生成这些网址:
…./?page=home
…./?page=contact
…./?page=privacy
Run Code Online (Sandbox Code Playgroud)
而权利将是:
/home
/contact
/privacy
Run Code Online (Sandbox Code Playgroud)
我必须做什么?
为了更好的搜索引擎优化,我需要在我的页面上添加一些元素:
<!-- Schema.org markup for Google+ -->
<meta itemprop="name" content="The Name or Title Here">
<meta itemprop="description" content="This is the page description">
<meta itemprop="image" content="http://www.example.com/image.jpg">
Run Code Online (Sandbox Code Playgroud)
这是来源.
然后我在标记验证服务上检查此代码:
<!DOCTYPE html>
<html>
<head lang="en">
<meta itemprop="name" content="The Name or Title Here">
<meta itemprop="description" content="This is the page description">
<meta itemprop="image" content="http://www.example.com/image.jpg">
<meta charset="UTF-8">
<title>My title</title>
</head>
<body>
My body.
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
抛出这个错误:
第4行,第57列:
itemprop
指定了属性,但该元素不是任何项的属性.Run Code Online (Sandbox Code Playgroud)<meta itemprop="name" content="The Name or Title Here">
第5行,第70列:
itemprop
指定了属性,但该元素不是任何项的属性.Run Code Online (Sandbox Code Playgroud)<meta itemprop="description" content="This is the …
当我尝试将我的应用程序上传到应用程序商店时,我收到以下错误:"由于一般错误,无法在此时查找应用程序的提交设置".有没有人收到这条消息?这是由于Apple开发人员门户问题吗?
IDEDistribution.critical.log:
2017-01-06 15:32:14 +0000 The store submission configuration response failed with errors: (
"Error Domain=ITunesConnectionOperationErrorDomain Code=1614 \"Unable to lookup the settings for submission for the application at this time due to a general error\" UserInfo={NSLocalizedRecoverySuggestion=Unable to lookup the settings for submission for the application at this time due to a general error, NSLocalizedDescription=Unable to lookup the settings for submission for the application at this time due to a general error, NSLocalizedFailureReason=iTunes Store operation failed.}"
), warnings: (
), info …
Run Code Online (Sandbox Code Playgroud) 我像这样创建了我的容器:
$ docker run -d -p 33060:3306 myimage
Run Code Online (Sandbox Code Playgroud)
然后我尝试从主机连接到容器中的mysql服务器:
$ mysql -uroot -proot -P 33060
Run Code Online (Sandbox Code Playgroud)
我收到了这个错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Run Code Online (Sandbox Code Playgroud)
但是,如果我有容器的IP:
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' mycontainer
172.17.0.55
Run Code Online (Sandbox Code Playgroud)
然后我可以成功连接到mysql服务器:
$ mysql -uroot -proot -h 172.17.0.55
Run Code Online (Sandbox Code Playgroud)
但是每次我创建一个连接到mysql的新容器时都要检查ip是一项繁琐的工作.我可以做任何设置来简化这项任务吗?
我跑:
$ docker run --rm -ti -p 9200:9200 -p 9300:9300 elasticsearch
Run Code Online (Sandbox Code Playgroud)
但我无法启动elasticsearch 5.0,这里的日志:
Unable to find image 'elasticsearch:latest' locally
latest: Pulling from library/elasticsearch
43c265008fae: Already exists
af36d2c7a148: Already exists
2b7b4d10e1c1: Already exists
9f7579daddb2: Already exists
a985511f2468: Already exists
6c2b485fcc3e: Already exists
00b73c83b440: Already exists
a38975861823: Pull complete
b9d0b4aaf934: Pull complete
f5f25bb3de04: Pull complete
93426e1e8953: Pull complete
590c2ab9b639: Pull complete
31bf48850601: Pull complete
21aad7ce70fa: Pull complete
Digest: sha256:29205bca045c8d083f777dfc453f4f1ff3d2c08ea4f529f88795166c58e5607e
Status: Downloaded newer image for elasticsearch:latest
[2016-10-31T20:56:22,023][INFO ][o.e.n.Node ] [] initializing ...
[2016-10-31T20:56:22,129][INFO …
Run Code Online (Sandbox Code Playgroud)