Eric Klaus
Eric Klaus

Reputation: 955

How to switch elastic version on Docker

I have elastic version 7.1.1 I want to use version 6.3.2

I need to start elastic using this command

docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana

I've downloaded version 6.3.2 by this command

docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.2

Now when I run

docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana

it still uses 7.1.1. How do I switch that to 6.3.2?

EDIT This is how my docker images looks like enter image description here

Upvotes: 0

Views: 355

Answers (1)

Ratish Bansal
Ratish Bansal

Reputation: 2442

Looks like there are 2 images of elasticsearch-kibana in your local.One for 7.1.1 and other for 6.3.2. You should provide the version as well with image name while running docker.

docker.elastic.co/elasticsearch/elasticsearch:6.3.2

Better to run docker images command once to check the tag for the respective image and use that to run docker.

Upvotes: 2

Related Questions