docker-curriculum
docker-curriculum copied to clipboard
Stuck in Docker tutorial
Dear Prakhar,
I was following your wonderful tutorial on Docker (https://docker-curriculum.com/)
However, I got stuck while trying the SF Food Truck project.
I cannot execute the following command successfully.
docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.2
277451c15ec183dd939e80298ea4bcf55050328a39b04124b387d668e3ed3943
I believe the part "277451c15ec183dd939e80298ea4bcf55050328a39b04124b387d668e3ed3943" is image id.
In my command, I used the actual image id. Please find the terminal results for your reference.
➜ FoodTrucks git:(master) sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
cosmicraga/catnip latest 71439972af37 3 hours ago 895MB
busybox latest b97242f89c8a 11 days ago 1.23MB
python 3 da24d18bf4bf 11 days ago 885MB
hello-world latest bf756fb1ae65 12 months ago 13.3kB
docker.elastic.co/elasticsearch/elasticsearch 6.3.2 96dd1575de0f 2 years ago 826MB
prakhar1989/static-site latest f01030e1dcf3 5 years ago 134MB
➜ FoodTrucks git:(master) sudo docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.2 96dd1575de0f
dbb170cae44eac0d8e268142a6e6d54a7c4e31c2f1208b8c6c3899a1278e590d
➜ FoodTrucks git:(master) sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
➜ FoodTrucks git:(master) sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
dbb170cae44e docker.elastic.co/elasticsearch/elasticsearch:6.3.2 "/usr/local/bin/dock…" 28 seconds ago Exited (127) 27 seconds ago es
➜ FoodTrucks git:(master) sudo docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
➜ FoodTrucks git:(master) sudo docker container logs es
/usr/local/bin/docker-entrypoint.sh: line 37: exec: 96dd1575de0f: not found
➜ FoodTrucks git:(master) curl 0.0.0.0:9200
curl: (7) Failed to connect to 0.0.0.0 port 9200: Connection refused
➜ FoodTrucks git:(master)
Please help.
Thanks in advance.
@cosmicraga you don't have to add the image id you should only execute the command which is:
docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.2