1

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?

Guy Ephraim
  • 3,482
  • 3
  • 26
  • 30

1 Answers1

3

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.

Community
  • 1
  • 1
techtabu
  • 23,241
  • 3
  • 25
  • 34