docker-elk icon indicating copy to clipboard operation
docker-elk copied to clipboard

No such image: docker-elk-elasticsearch:latest when docker compose up setup

Open bastien-rcl opened this issue 7 months ago • 3 comments

Problem description

I have set up a new server with Ubuntu Server 24.04, installed docker, cloned the repo and did docker compose up setup. It returned Container docker-elk-elasticsearch-1 Error response from daemon: No such image: docker-elk-elasticsearch:latest. As I was in doubt, I tried to do the same on my local laptop with arch linux, just cloned the repo and launched the same command. It returned the same error. I installed it in the same way a few weeks ago on 2 other Ubuntu Servers 24.04 and the install was successful.

Here is the complete output :

Compose can now delegate builds to bake for better performance.
 To do so, set COMPOSE_BAKE=true.                                                                                                                                                                               
[+] Building 12.5s (6/6) FINISHED                                                                                                                                                                docker:default
 => [setup internal] load build definition from Dockerfile                                                                                                                                                 0.0s
 => => transferring dockerfile: 201B                                                                                                                                                                       0.0s
 => [setup internal] load metadata for docker.elastic.co/elasticsearch/elasticsearch:9.0.1                                                                                                                 1.6s
 => [setup internal] load .dockerignore                                                                                                                                                                    0.0s
 => => transferring context: 160B                                                                                                                                                                          0.0s
 => [setup 1/1] FROM docker.elastic.co/elasticsearch/elasticsearch:9.0.1@sha256:9244a573c48bc120c8ac4daf61d48dcda48db2b25fd1b3c4cbeb01aa175a8495                                                          10.8s
 => => resolve docker.elastic.co/elasticsearch/elasticsearch:9.0.1@sha256:9244a573c48bc120c8ac4daf61d48dcda48db2b25fd1b3c4cbeb01aa175a8495                                                                 0.0s 
 => => sha256:7ee6412338fb20b09b840927482b32a48a8019935954cff8b79f8b49f413deb3 4.51MB / 4.51MB                                                                                                             0.4s
 => => sha256:fc341b41fd04f285c1b3d582a0504a51b16e511e2cf4b46aaf58b11e2b6d4571 1.65kB / 1.65kB                                                                                                             0.4s
 => => sha256:f5c2b9c76f0b5f0e7af5c108982569d2c5b36229221669eb33b859a462476a02 1.89kB / 1.89kB                                                                                                             0.0s
 => => sha256:2ae718406cff8daa580eb29144c5f961d516583e34c42fca0621b199ad0c8c72 11.43kB / 11.43kB                                                                                                           0.0s
 => => sha256:028259b826c7863ec17af84b65755af817b8d44694b75a7dd7de4112daac7942 39.98MB / 39.98MB                                                                                                           0.4s
 => => sha256:9244a573c48bc120c8ac4daf61d48dcda48db2b25fd1b3c4cbeb01aa175a8495 685B / 685B                                                                                                                 0.0s
 => => extracting sha256:028259b826c7863ec17af84b65755af817b8d44694b75a7dd7de4112daac7942                                                                                                                  1.1s 
 => => sha256:3722d56f9a1de1b3bcbf5ee71cb8d185fd302699a2a1f1cf0caf0fe1f8791124 679.09MB / 679.09MB                                                                                                         4.0s 
 => => sha256:b776b57cccb6797d66528ccfd94ab475a5b5207f2cf15d0794308693f20a868c 9.76kB / 9.76kB                                                                                                             0.5s
 => => sha256:4ca545ee6d5db5c1170386eeb39b2ffe3bd46e5d4a73a9acbebc805f19607eb3 42B / 42B                                                                                                                   0.5s
 => => sha256:97f62d6ece14b87fed5f6d419fe26625bfe15e538732baeadc2493c78e3b83c6 1.76kB / 1.76kB                                                                                                             0.7s
 => => sha256:2786b071bbe60cb229899f03246efc13bc4012fa0f9e0d48393c2820c354568d 287B / 287B                                                                                                                 0.6s
 => => sha256:a72be91918a5afd7d50e2d3b783f92aca2ae0b533376075441ee17ba131c5cd7 80.75kB / 80.75kB                                                                                                           0.8s
 => => sha256:4fa25544433a3c0f79779283af661f54852407fa82eccc7e609132094c22f29a 1.88kB / 1.88kB                                                                                                             0.9s
 => => extracting sha256:7ee6412338fb20b09b840927482b32a48a8019935954cff8b79f8b49f413deb3                                                                                                                  0.2s
 => => extracting sha256:fc341b41fd04f285c1b3d582a0504a51b16e511e2cf4b46aaf58b11e2b6d4571                                                                                                                  0.0s
 => => extracting sha256:b776b57cccb6797d66528ccfd94ab475a5b5207f2cf15d0794308693f20a868c                                                                                                                  0.0s
 => => extracting sha256:4ca545ee6d5db5c1170386eeb39b2ffe3bd46e5d4a73a9acbebc805f19607eb3                                                                                                                  0.0s
 => => extracting sha256:3722d56f9a1de1b3bcbf5ee71cb8d185fd302699a2a1f1cf0caf0fe1f8791124                                                                                                                  6.7s
 => => extracting sha256:2786b071bbe60cb229899f03246efc13bc4012fa0f9e0d48393c2820c354568d                                                                                                                  0.0s
 => => extracting sha256:97f62d6ece14b87fed5f6d419fe26625bfe15e538732baeadc2493c78e3b83c6                                                                                                                  0.0s
 => => extracting sha256:a72be91918a5afd7d50e2d3b783f92aca2ae0b533376075441ee17ba131c5cd7                                                                                                                  0.0s
 => => extracting sha256:4fa25544433a3c0f79779283af661f54852407fa82eccc7e609132094c22f29a                                                                                                                  0.0s
 => [setup] exporting to image                                                                                                                                                                             0.2s
 => => exporting layers                                                                                                                                                                                    0.0s
 => => writing image sha256:3691f7336be2a9728bcaf9e07e1fcf19fafc48ffaa24e998fadcca1b544eaf51                                                                                                               0.0s
 => => naming to docker.io/library/elk-setup                                                                                                                                                               0.0s
 => [setup] resolving provenance for metadata file                                                                                                                                                         0.0s
WARN[0012] mount of type `volume` should not define `bind` option 
[+] Running 3/3
 ✔ setup                          Built                                                                                                                                                                    0.0s 
 ✔ Volume "elk_elasticsearch"     Created                                                                                                                                                                  0.0s 
 ✘ Container elk-elasticsearch-1  Error response from daemon: No such image: elk-elasticsearch:latest                                                                                                      0.0s 
Error response from daemon: No such image: elk-elasticsearch:latest

Extra information

Stack configuration

I cloned the bare repository.

Docker setup

$ docker version

Client: Docker Engine - Community
 Version:           28.2.2
 API version:       1.50
 Go version:        go1.24.3
 Git commit:        e6534b4
 Built:             Fri May 30 12:07:27 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.2.2
  API version:      1.50 (minimum version 1.24)
  Go version:       go1.24.3
  Git commit:       45873be
  Built:            Fri May 30 12:07:27 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

$ docker compose version

Docker Compose version v2.36.2

Container logs

$ docker compose logs

there are no logs at all

bastien-rcl avatar Jun 02 '25 15:06 bastien-rcl

Note that if I previously create the images with docker compose build then the setup works. But I'm not sure it was intended to work that way, and I don't remember having to do that in previous installs.

bastien-rcl avatar Jun 03 '25 07:06 bastien-rcl

Encountering the same issue, turns out I have the exact same Ubuntu and Docker versions as you. Building the Elasticsearch image before docker compose up setup worked for me too.

Marius-Ar avatar Jun 03 '25 07:06 Marius-Ar

This is an upstream bug that has since been fixed:

  • https://github.com/docker/compose/pull/12896

For the time being, please avoid using this broken revision of Compose.

antoineco avatar Jun 06 '25 08:06 antoineco

Hello am having the same issue after upgrading to Docker version 28.2.2, build e6534b4. It was working fine with just "docker compose up setup" when I was running Docker version 28.1.1.

I think the fix is a small tweak in the code that the team has to patch for it to be clean

Kangarstar avatar Jun 19 '25 10:06 Kangarstar

@Kangarstar the bug (and fix) is in Compose, not in the Docker engine. The version you must avoid is Compose 2.36.

antoineco avatar Jun 19 '25 10:06 antoineco

The current Compose release is 2.39, so I'm going to assume that this problem is now solved.

antoineco avatar Jul 26 '25 08:07 antoineco