I am getting following error:
docker: Error response from daemon: Container command '-name' not found or does not exist.
I am following the example in the CoreOS documentation for running etcd under Docker.
The following is the configuration I am trying to run:
docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
--name etcd quay.io/coreos/etcd \
-name k8_etcd0 \
-advertise-client-urls http://10.0.0.4:2379,http://10.0.0.3:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://10.0.0.3:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster k8_etcd0=http://10.0.0.4,k8_etcd1=http://10.0.0.5:2388 \
-initial-cluster-state new
you're missing command to launch in your docker container etcd
docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
--name etcd quay.io/coreos/etcd \
etcd \
-name k8_etcd0 \
-advertise-client-urls http://10.0.0.4:2379,http://10.0.0.3:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://10.0.0.3:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster k8_etcd0=http://10.0.0.4,k8_etcd1=http://10.0.0.5:2388 \
-initial-cluster-state new
plus some fixes that you need about initial cluster etc. but that you will see when you launch it in error messages