# Upgrade ELK on docker from 7.10 to 7.17

**URL:** https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839
**Category:** Elasticsearch
**Tags:** docker
**Created:** [August 24, 2022, 7:48pm UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839 "2022-08-24T19:48:06Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Boodle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boodle/32/86046_2.png) [@Boodle](https://discuss.elastic.co/u/Boodle)
#### Post date: [August 24, 2022, 7:48pm UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/1 "2022-08-24T19:48:06Z")

</div>

Need to upgrade Elasticsearch , Kibana installed with docker compose from 7.10 to 7.17  
[This document](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/rolling-upgrades.html)  
shares other methods but not containers installed/started with docker compose - swarm.  
Is their a steps by step documentation for the same?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 24, 2022, 10:24pm UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/2 "2022-08-24T22:24:53Z")

</div>

Not one that we provide sorry.

Generally with docker containers you would just point the compose file to the new image, and then restart it.

---

<div class="post-metadata">

### Author: ![Boodle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boodle/32/86046_2.png) [@Boodle](https://discuss.elastic.co/u/Boodle)
#### Post date: [August 25, 2022, 1:41pm UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/3 "2022-08-25T13:41:05Z")

</div>

> [@warkolm](#):
>
> just point the compose file to the new image

Need to do complete installation of the new image 7.17 as was done for 7.10 & then point to it?

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [August 26, 2022, 2:54am UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/4 "2022-08-26T02:54:34Z")

</div>

According to my understanding, first of all you'd better take a snapshot, and volumes have to use the original location, then modify the image tag, and finally docker-compose up, remember that you should use docker-compose stop to end the container at the beginning, not Use docker-compose down. If you're still worried, you can take a test.

---

<div class="post-metadata">

### Author: ![Boodle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boodle/32/86046_2.png) [@Boodle](https://discuss.elastic.co/u/Boodle)
#### Post date: [August 26, 2022, 3:00am UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/5 "2022-08-26T03:00:58Z")

</div>

> [@wajika](#):
>
> and volumes have to use the original location, then modify the image tag,

Can you share the steps to modify the image tag?

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [August 26, 2022, 8:49am UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/6 "2022-08-26T08:49:16Z")

</div>

It's very simple, assuming you use the following docker-compose.yml to deploy, then just execute docker-compose stop, end the container, then modify elasticsearch:7.10 to elasticsearch:7.17.6, and finally open the container again docker-compose up.

```auto
version: '3.6'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.10
    container_name: es-docker
    environment:
      - node.name=es-docker
      - cluster.name=es-single-node
      - discovery.type=single-node
      - bootstrap.memory_lock=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
      - 9300:9300
    networks:
      - elastic

volumes:
  esdata:
    driver: local

networks:
  elastic:
    driver: bridge

```

---

<div class="post-metadata">

### Author: ![Boodle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boodle/32/86046_2.png) [@Boodle](https://discuss.elastic.co/u/Boodle)
#### Post date: [August 26, 2022, 4:52pm UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/7 "2022-08-26T16:52:48Z")

</div>

ahh, thanks. yeah it's really simple and i was going around places. 😀

One last query, during last step, i get below error. Where all should i rename containers es01/02/03/kib01 so it recreate the containers? I want to retain the data and all other stuff, just upgrade to 7.17.

"Status: Downloaded newer image for [docker.elastic.co/kibana/kibana:7.17.6](http://docker.elastic.co/kibana/kibana:7.17.6)  
Creating es03 ... error  
Creating es01 ...  
Creating kib01 ...  
Creating es02 ...

Creating es02 ... error  
ner to be able to reuse that name.

ERROR: for es02 Cannot create container for service es02: Conflict. The container name "/es02" is already in use by container "". You have to remove (or rename) that contaiCreating kib01 ... error  
Creating es01 ... error  
ERROR: for kib01 Cannot create container for service kibana: Conflict. The container name "/kib01" is already in use by container "". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for es01 Cannot create container for service es01: Conflict. The container name "/es01" is already in use by container "". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for es03 Cannot create container for service es03: Conflict. The container name "/es03" is already in use by container "". You have to remove (or rename) that container to be able to reuse that name.

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [August 27, 2022, 12:58am UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/8 "2022-08-27T00:58:40Z")

</div>

I guess you should run docker container ls to see if the container is still running and delete the es01-03 and kib01 containers.  
But there is another note, in cluster mode, there will be a clusterId, elastic data is bound to it, you need to let es recognize it and generate new coverage, I have not tested the cluster upgrade, you'd better do a test first.

---

<div class="post-metadata">

### Author: ![Boodle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boodle/32/86046_2.png) [@Boodle](https://discuss.elastic.co/u/Boodle)
#### Post date: [August 30, 2022, 5:23pm UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/9 "2022-08-30T17:23:35Z")

</div>

In another environment, docker-compose.yml image mentions the version as below and there is no .env file as well. Where should i update the version number in such a case to upgrade ES?

image: [docker.elastic.co/elasticsearch/elasticsearch:${VERSION}](http://docker.elastic.co/elasticsearch/elasticsearch:%24%7BVERSION%7D)

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [August 31, 2022, 3:30am UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/10 "2022-08-31T03:30:51Z")

</div>

Create a new environment variable value VERSION, or write it in the `.env` file.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 28, 2022, 3:31am UTC](https://discuss.elastic.co/t/upgrade-elk-on-docker-from-7-10-to-7-17/312839/11 "2022-09-28T03:31:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
