See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.jsonfile in/etc/docker:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| import java.net.InetSocketAddress | |
| import scala.xml.{Elem, XML} | |
| import org.jboss.netty.buffer.ChannelBuffers | |
| import org.jboss.netty.util.CharsetUtil.UTF_8 | |
| import com.twitter.finagle.Service; | |
| import com.twitter.finagle.builder.ClientBuilder; | |
| import com.twitter.finagle.http.{Http, RequestBuilder}; | |
| import org.jboss.netty.handler.codec.http._ | |
| import org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer | |
| import java.net.URL |
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
| #!/bin/bash | |
| # run this scripts with `bash emoji-info.sh` or `./emoji-info.sh` | |
| usage() { | |
| cat << EOF | |
| usage: $0 [options] <emoji> | |
| Options: | |
| -h Show this message | |
| -o Octal Escape Sequence |
| package mycompany.myappp.config; | |
| import org.apache.commons.io.IOUtils; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.http.HttpInputMessage; | |
| import org.springframework.http.HttpOutputMessage; | |
| import org.springframework.http.MediaType; | |
| import org.springframework.http.converter.AbstractHttpMessageConverter; | |
| import org.springframework.http.converter.HttpMessageConverter; | |
| import org.springframework.http.converter.HttpMessageNotReadableException; |
CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJja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|
| name: system:aggregated-metrics-reader | |
| labels: | |
| rbac.authorization.k8s.io/aggregate-to-view: "true" | |
| rbac.authorization.k8s.io/aggregate-to-edit: "true" | |
| rbac.authorization.k8s.io/aggregate-to-admin: "true" | |
| rules: | |
| - apiGroups: ["metrics.k8s.io"] |
| #!/bin/bash | |
| ## Generic installation on all nodes | |
| sysctl -w net.ipv4.ip_forward=1 | |
| sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf | |
| sudo sysctl -p /etc/sysctl.conf | |
| swapoff -a | |
| sed -i '2s/^/#/' /etc/fstab |