When I try to run etcd (version 3.0.0) on Docker:
sudo 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:v3.0.0 \
-name etcd0 \
-advertise-client-urls http://${HostIP}:2379,http://${HostIP}:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://${HostIP}:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster etcd0=http://${HostIP}:2380 \
-initial-cluster-state new
I have an error:
docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"-name\\\": executable file not found in $PATH\"\n".
What is the reason of this error and how I can fix it?
As mentioned in the comments, the quay.io/coreos/etcd:v3.0.0 image does not contain an
ENTRYPOINT
, instead opting forCMD
. So, if you want to supply all the arguments on thedocker run
you will need to specify the command as well: