NSQ docker install
下载nsq镜像
1
[root@k8s1 ~]# docker pull nsqio/nsq
run nsqlookupd
1
2
3
4[root@k8s1 ~]# docker run --name nsqlookupd -p 4160:4160 -p 4161:4161 nsqio/nsq:latest /nsqlookupd
or:
[root@k8s1 ~]# docker run --name nsqlookupd -p 5160:4160 -p 5161:4161 nsqio/nsq:latest /nsqlookupdrun nsqd
1
2
3
4
5
6
7
8
9
10
11
12
13[root@k8s1 ~]# docker run --name nsqd -p 4150:4150 -p 4151:4151 nsqio/nsq:latest /nsqd --broadcast-address=192.168.1.2 --lookupd-tcp-address=192.168.1.2:4160
or:
[root@k8s1 ~]# docker run -p 4150:4150 -p 4151:4151 -p 4152:4152 -v /home/docker/certs:/etc/ssl/certs \
nsqio/nsq:latest /nsqd \
--tls-root-ca-file=/etc/ssl/certs/certs.crt \
--tls-cert=/etc/ssl/certs/cert.pem \
--tls-key=/etc/ssl/certs/key.pem \
--tls-required=true \
--tls-client-auth-policy=require-verify
or:
[root@k8s1 ~]# docker run nsqio/nsq:latest /nsqd --data-path=/datarun nsqadmin
1
[root@k8s1 ~]# docker run --name nsqadmin -p 4171:4171 nsqio/nsq:latest /nsqadmin --lookupd-http-address=192.168.1.2:4161