Questions tagged «systemd»

systemd是传统Linux init的现代替代品。它的主要功能包括表达服务之间的依赖关系和主动启动服务并行化的能力。

2
CoreOS Fleet Unit文件和Docker动态端口问题
我目前正在尝试获取动态端口,以便可以在CoreOS上的etcd中注册它。事实证明,这非常困难。 这是我的单位档案 [Unit] Description=test Elastic Search Server After=docker.service Requires=docker.service [Service] User=core ExecStartPre=/usr/bin/docker pull shizzle/elasticsearch-server ExecStart=/bin/bash -c '/usr/bin/docker start -a %n || /usr/bin/docker run --name="%n" -p :9200 -p :9300 shizzle/elasticsearch-server /elasticsearch/bin/elasticsearch -Des.config=/etc/elasticsearch.yml' ExecStartPost=-/usr/bin/etcdctl mkdir /%n ExecStartPost=/usr/bin/etcdctl set /%n/host %H ExecStartPost=/bin/bash -c "/usr/bin/etcdctl set /%n/port $(docker inspect --format='{{(index (index .NetworkSettings.Ports "9200/tcp") 0).HostPort}}' …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.