pelias / dashboard

Pelias dashboard built with the Dashing framework
7 stars 12 forks source link

Docker compose issue? #10

Closed Binternet closed 6 years ago

Binternet commented 6 years ago
root@dev-pelias-importer:/pelias/dashboard# docker-compose up
Recreating 071b9ee7838d_071b9ee7838d_071b9ee7838d_071b9ee7838d_pelias-dashboard

ERROR: for dashboard  No such image: sha256:c2d23336389826b04987354eabc3b4cc4900403d1bdea25ca47f38d32881d9d5
ERROR: Encountered errors while bringing up the project.

Am I missing something?

missinglink commented 6 years ago

there is an error in the docker-compose.yml which I just fixed in https://github.com/pelias/dashboard/pull/11

The correct image name is pelias/dashboard:latest not pelias-dashboard:latest.

Please update your docker-compose.yml accordingly and run:

docker-compose pull

You should see something like:

Pulling dashboard (pelias/dashboard:latest)...
latest: Pulling from pelias/dashboard
Digest: sha256:8e2fea466caf646028980c3e9e6679a35f4d990879a9fa9e6fa6456d5d5a2dc3
Status: Image is up to date for pelias/dashboard:latest
Binternet commented 6 years ago

Fixed it by removing all containers, all images and running docker-compose up --build

missinglink commented 6 years ago

Yep that works too :)

Binternet commented 6 years ago

How by removing all containers and images the issue was resolved if the docker-compose.yml still contains the wrong image name?

missinglink commented 6 years ago

By default docker-compose.yml will pull the image from https://hub.docker.com/r/pelias/dashboard/ (which is why it needs the / not a -), this is an image that someone in the team has built and pushed to dockerhub.

If the docker-compose.yml includes a step such as:

    build:
      context: .

... then docker compose is able to build the image locally on your laptop, in this case it tags it with whatever value is in the image: field, you can confirm this by running docker images, you will see your image there.

then when you run docker-compose up it looks for an image with the expected name and if it finds it then it works!

Binternet commented 6 years ago

These are my current images:

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
pelias-dashboard    latest              e99925b43252        10 minutes ago      802 MB
ruby                2.3                 7ab6e81790b8        13 days ago         722 MB
pelias/dashboard    latest              24d1b3442391        7 weeks ago         818 MB

But my question is - how come it worked even though I just removed all containers and images without modifying the docker-compose.yml file?