Unable to use elasticsearch 2.3.3 docker image

Hi there!

I'm working on a client project where their app uses the docker image for elasticsearch 2.3.3.

My issue is that I'm currently unable to build the client's containers. When I run their setup script, or if I try to run docker build . from the directory they have their elasticsearch Dockerfile, I get the following:

[+] Building 1.2s (6/11)                                                                                                                      docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                          0.0s
 => => transferring dockerfile: 513B                                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/elasticsearch:2.3.3                                                                                        1.1s
 => [auth] library/elasticsearch:pull token for registry-1.docker.io                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                               0.0s
 => ERROR [1/6] FROM docker.io/library/elasticsearch:2.3.3@sha256:59a7522cad52e6e323aedf62d638ee8d4f0391dd645d48f68579c875cc791ebe                            0.0s
 => => resolve docker.io/library/elasticsearch:2.3.3@sha256:59a7522cad52e6e323aedf62d638ee8d4f0391dd645d48f68579c875cc791ebe                                  0.0s
 => CANCELED [internal] load build context                                                                                                                    0.0s
 => => transferring context: 670B                                                                                                                             0.0s
------
 > [1/6] FROM docker.io/library/elasticsearch:2.3.3@sha256:59a7522cad52e6e323aedf62d638ee8d4f0391dd645d48f68579c875cc791ebe:
------
Dockerfile:1
--------------------
   1 | >>> FROM elasticsearch:2.3.3
   2 |
   3 |     RUN bin/plugin install https://repo1.maven.org/maven2/org/elasticsearch/plugin/analysis-phonetic/2.3.3/analysis-phonetic-2.3.3.zip
--------------------
ERROR: failed to solve: failed to load cache key: "" failed validation: invalid argument

I've tried googling this issue but wasn't able to find any hinst as to what the issue was. The 2.3.3 image is on dockerhub. I did notice the sha in dockerhub was different from the one docker attempts to pull down, but even specifying the right sha yields a similar message.

I'm currently suspecting that it's because of my CPU architecture (Mac M2) but other colleagues of mine didn't have this issue and they also use apple silicon.

At any rate, any ideas as to what this error message means?

Welcome!

This version is so old that you must not use it.

Yes. That's probably the cause. And that problem has been solved. So please use 8.12.2...

1 Like

Well, yes, I'd like to do so, however the nature of my job implies that I need to retain stability unless there really is no way around it. The client's app is going to be phased out, but they need to upgrade their Rails version in order to maintain certain features. And in order for this process to be less involved as possible, it would be ideal not to change the elasticsearch version they use, since that implies possible migration work that isn't required to upgrade Rails, adds time to the process and won't really bring much benefit because the application is being deactivated.

Does the message really mean that I can't make it work? Are there really no alternatives?

I don't know. What does your Dockerfile looks like?

So.... It just happened to work...

I honestly don't know why. My current theory is that it worked after (for unrelated reasons) I had to create a separate user on my computer and move my work there. Under my old user I had installed other versions of elasticsearch for other projects, all using docker.

So I think that that must've been the issue. Maybe some conflict in image configuration and how they expected the host system to behave? I honestly don't know...

Under my old user I had installed other versions of elasticsearch for other projects, all using docker.

Worth mentioning that, under the old user, I did clear all volumes. I did not, however, delete all elasticsearch images. Although I fail to see why that should matter....

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