You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/setup/install/docker.asciidoc
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -764,3 +764,47 @@ To resolve this error:
764
764
path rather than the keystore file's path. For an example, see
765
765
<<docker-keystore-bind-mount>>.
766
766
. Retry the command.
767
+
768
+
==== Updating or Upgrading the Elasticsearch version running on Docker
769
+
Updating Elasticsearch running in a Docker container involves pulling the new Docker image and restarting the container with the new image.
770
+
771
+
1. Pull the new version of the Elasticsearch Docker image from Elastic's Docker registry using the `docker pull` command. Replace `x.y.z` with the version number you want to update to.
2. Stop the currently running Elasticsearch container. Replace `container_name` with the name or ID of your Elasticsearch container.
777
+
----
778
+
docker stop container_name
779
+
----
780
+
781
+
3. Once the container has stopped, remove it. This will not delete your data if you have correctly mapped your data directory to a volume outside of the container.
782
+
----
783
+
docker rm container_name
784
+
----
785
+
786
+
4. Start a new container using the new image. Make sure to use the same volume mappings and configuration settings as the old container to ensure that your data and configuration are preserved. Replace `container_name` with the name you want for your new container.
787
+
----
788
+
docker run --name container_name -p 9200:9200 -p 9300:9300 \
The response should show the version number of Elasticsearch that you updated to.
804
+
805
+
**Important Notes**:
806
+
- Always back up your data before performing an update, especially for production environments.
807
+
- Review the Elasticsearch release notes for the new version to be aware of any breaking changes or required actions before or after the update.
808
+
- If you're using custom plugins or configurations, ensure they are compatible with the new version and reapply them if necessary.
809
+
- If you're running a cluster, you'll need to carefully plan the upgrade process to minimize downtime and ensure cluster stability. This often involves a rolling upgrade strategy.
810
+
- When using a `docker-compose.yml` make sure to update the desired version in the configuration file or the environment variable.
0 commit comments