Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to retrive an old image #242

Open
pvklink opened this issue Jun 17, 2021 · 5 comments
Open

how to retrive an old image #242

pvklink opened this issue Jun 17, 2021 · 5 comments

Comments

@pvklink
Copy link

pvklink commented Jun 17, 2021

HI, i use iotstack for two months now and very exited.
I made my own menu for creating the compose file etc. based on my own composed parts and dockerfiles
I use only the docker commands in the menu from iotstack.
I mainly execute dockerimages with tag "latest". Some questions:

But what if the latest image isnt ok,!

  • do i have the previous image, where can i find this. I tried docker images and a search on my disk but no images
  • which data did i had to backup and must i restore when activating this previous image
  • how does this work in the menus from iotstack...
@Paraphraser
Copy link
Contributor

Please see THIS PROJECT IS DORMANT.

To answer your question…

Option 1 - the DockerHub image is running

Look in your docker-compose.yml.

Suppose you see:

  grafana:
    container_name: grafana
    image: grafana/grafana:latest

The "image" is telling you that the grafana image comes straight from DockerHub.

If you want to pin Grafana to, say, version 7.5.7, change that image line to be:

    image: grafana/grafana:7.5.7

and then do:

$ docker-compose up -d grafana

The version 7.5.7 image will be pulled down from DockerHub, a new container will be instantiated, and the old container discarded.

Option 2 - a local image is running

Look in your docker-compose.yml.

Suppose you see:

  nodered:
    container_name: nodered
    build: ./services/nodered/.

The "build" tells you a Dockerfile is involved. A base image is pulled down from DockerHub, the Dockerfile runs to produce a local image, and the local image is what runs.

The leading "." means "the directory containing docker-compose.yml" and the trailing "." means Dockerfile so the path you need is:

~/IOTstack/services/nodered/Dockerfile

The start of that Dockerfile is:

FROM nodered/node-red:latest-12

You need to go to the DockerHub tags page to figure out what to do next.

The current version of Node-RED is "1.3.5" and the "-12" suffix is talking about the version of NodeJS. To roll back to version 1.3.4 with the same NodeJS:

FROM nodered/node-red:1.3.4-12

then do:

$ docker-compose up -d --build nodered

Hope that helps.

@pvklink
Copy link
Author

pvklink commented Jun 17, 2021

Thank Paraphraser,
A lot om my composefiles or dockerfile refer to for example:domoticz/domoticz:latest
https://hub.docker.com/r/domoticz/domoticz/tags?page=1&ordering=last_updated

When this image is not ok, i want the previous. i dont see any other images on that site.
Alternative is to save the image that worked before. I use IOTstack, so i am searching for the datastorage to save it from there.
I hoped that the docker images command and the show image id would help, but it does not...

@Paraphraser
Copy link
Contributor

The docker images command just lists the images available on your local computer.

I see what you mean about demoticz/demoticz. Unfortunately, docker and docker-compose can only pull what is available on DockerHub. Most image maintainers understand that, sometimes, users may need to revert to older versions, so they only ever add to DockerHub and never remove. The person maintaining demoticz/demoticz is not playing the game in a user-friendly manner.

But I have a question for you. Why are you using domoticz/domoticz instead of linuxserver/domoticz?

The SensorsIot/IOTstack template for domoticz refers to linuxserver/domoticz while gcgarner/IOTstack doesn't even have a template for domoticz.

There are only two reasons why people open issues on gcgarner/IOTstack:

  1. They are actually using SensorsIot/IOTstack but went to gcgarner by mistake.
  2. They are still using gcgarner and haven't realised that it stopped being maintained 18 months ago.

If you really are using gcgarner/IOTstack then it is probably time to migrate over. See the migration instructions.

Unless there is some good reason why you must use domoticz/domoticz rather than linuxserver/domoticz, I think you'll find that the people behind linuxserver/domoticz are playing the DockerHub game correctly. They keep all the back versions there (43 pages' worth going back 4 years). 10 million pulls indicates a lot of happy users.

domoticz/domoticz just has the one version on DockerHub. 100K pulls is also not a small number so I'm not trying to suggest there's anything "wrong" with domoticz/domoticz. I'm just pointing out that linuxserver/domoticz will give you the ability to roll backwards and the 10M pulls can give you a fair bit of confidence that it will work.

But it's your system and your decision.

@pvklink
Copy link
Author

pvklink commented Jun 18, 2021

Thanks!
Just new in the world of docker!
So i started with an install of IOTstack, to make a flying start. After two months i have all my functionallity installed with docker.
No idea if a have gcgarner or sensorlot version, where can i see that ?
I use the domoticz/domoticz because i was ona beta version with my environment and linuxserver did not publish beta's
If linuxserver is better and also has the beta's, i will change!

@pvklink
Copy link
Author

pvklink commented Jun 18, 2021

i have the sensorsIOT!

I have domoticz Version: 2021.1 (build 13314) running on my rpi
Let say, i got a crash and saved my data,thats on 13314).
Is there a linuxserver/domoticz image thats fitting my data when crashing...
It is hard to find the buildspecification in linuxserver/domoticz

samkomo pushed a commit to samkomo/IOTstack that referenced this issue Dec 22, 2021
Bugfix for rtl_433 (docker) needs to run with iotstack_nw network to see mosquitto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants