Guy Ephraim
Guy Ephraim

Reputation: 3520

Installing elasticsearch docker image fails on command not found

I'm trying to install elasticsearch from an image I've created on another machine, however when I create the container it say that the command not found. I've understood that the command is not exported as part of the image, however I can't find the right command to spesify for it to work.

on Machine A I'm creating the image as such:

sudo docker pull elasticsearch
sudo docker save -o "elastic.image.tar" elasticsearch

On machine B I'm importing the image and trying to run it

sudo docker import "elastic.image.tar"
sudo docker run -d elasticsearch

on the docker run I get

docker: Error response from daemon: No command specified.
See 'docker run --help'.

I've also tried the following commands:

sudo docker run -d elasticsearch elasticsearch
sudo docker run -d elasticsearch "/docker-entrypoint.sh elasticsearch"
sudo docker run -d elasticsearch "/usr/share/elasticsearch/docker-entrypoint.sh elasticsearch"
sudo docker run -d elasticsearch "/bin/bash"

None of them worked, all returned responce like: docker: Error response from daemon: Container command 'XXX' not found or does not exist..

What is the right command to specify here?

Upvotes: 1

Views: 1126

Answers (1)

techtabu
techtabu

Reputation: 26919

Can you try docker load -i elastic.image.tar and call docker run elasticsearch. Check this question to know some differences between save/load and export/import.

Upvotes: 3

Related Questions