Is there any possibality to run docker-autoheal (or similar..) for an Image that already running without having the dockerfile? - docker

I have an image that I cannot miss on anything on it, but I need any other way to monitor it or applying any other docker-autoheal alternative tool, the issue that most of the docker-autoheal documaintaion needs to modify the image configuration and add a health check to it (which is not possible to my situation).
My main goal here is to auto restart the image after it's stopped/failed immedialty.

Hi you can use docker commit in order to make changes to the image :)

Related

Docker Image "in use" What does it really mean?

I am getting the following output in my Docker Desktop GUI. What does the IN USE mean?
As described on the official documentation page:
It also displays In Use tags next to images used by running and stopped containers. This allows you to review the list of images and use the Clean up images option to remove any unwanted images from the disk to reclaim space.
Basically In Use means that the image is being used by an existing container and that the clean operation will not remove it automatically.
Any image not in use, will be purged as part of any clean action to save space.

Add style to running OpenMapTiles server

I'm using the OpenMapTiles Docker image on a VPS, and would like to use a custom map style created with Maputnik. I've already gone through the "setup" process, so when I go to the server's address, I see a list of the styles currently available. I don't see any option to add a new style, so I was wondering if this is possible?
Just add the json style file to the default folder and restart the OpenMapTiles server.
Edit: restart might not be the best option. Try a full stop and start then.

xen-hypervisor - right way of snapshot and revert

I have an CentOS 7 with xen-hypervisor 4.6.6.
I manage the VMs from cli with xen-tools (xl, etc).
The VM disks are managed with LVM.
I would like to create snapshot of VM and revert if needed (eg.: in case of failed system update).
Please tell me the right way to do it and these steps.
Thanks for the help!
(and sorry for my english)
I am actually facing the same issue by trying Xen-hypervisor (not xen-server neither xen-api) and i will add some more information here.
From now this is what i found: https://searchservervirtualization.techtarget.com/tip/Creating-snapshots-in-Xen-with-Linux-commands
The main difference from this topic is that I use xl and not xm.
Now, I have my snapshot.img and my snapshot.sav (cf topic).
I dont know what to do with those since xl restore seems to just restore the domain and when i use dd back to put the disk image in the LVM partition, i dont succeed to launch again the VM.
Any advice on that ?
Coming back on this topic, i ended up using XenOrchestra to handle snapshot and export.
Also, one big mistake i had in my mind was confusing snapshot and export (image).
A snapshot is a state in time of your vm whereas an export is the entire vm. I was trying to use a snapshot to recreate a vm after removal which does not make sense.
Also, i think that you can do it easily with XenCenter.

Better approach to docker images

I'm new in docker so I want to know what is the better approach to use it. I have a Project that needs three components to work:
Jboss server application
PostgreSQL
A spring boot application
So, based on it my questions are:
1) Should I have one docker image for each component mentioned above? If yes, why not just put all together? My idea of docker is simplify the deploy of a application so put all together will make easy to install this app in another environment, right?
2) If yes (one docker image per component), spring boot is just a "Java -jar" command is really necessary have a docker image to it?
3) In case of PostgreSQL should I have the image with all my database structure and data or just vanilla PostgreSQL without anything?
To answer your questions
1) should I have one docker image for each component mentioned above ?
If yes, why not just put all together? My idea of docker is simplify
the deploy of a application so put all together will make easy to
install this app in another environment, right?
It is best to put them on a separate components so that:
You can isolate cases(will help you in debugging)
You can selectively scale(horizontally) specific stateless components when you run on k8s or docker-swarm
You can set hardware limit(RAM, CPU, etc) per component
You have different base images(might be useful for optimizations)
You want to build & test your components independently
List goes on
2) if yes (one docker image per component), spring boot is just a
"Java -jar" command is really necessary have a docker image to it?
Please check the list mentioned above (why it's best to separate) if it fits your use case. Note that adding it to existing components will affect your scaling strategy
Example - you run 3 instances of jboss component with spring boot app, you will spawn 3 instances for both of them w/c you might not want.
3) in case of PostgreSQL should I have the image with all my database
structure and data or just vanilla PostgreSQL without anything?
I would recommend that you mount your structure & data to the host volume, so that it doesn't get lost when the image is restarted. see example so i'll recommend using vanilla postgres
I hope this helps you in some way

Clone server to docker image

I have Centos server and there is a lot of configuration that there is no documentation of it.
I need to make a clone of that server in docker image so i can use it for different code.
Is there a script,software or service can do that for me ?
i am not sure exactly what you are trying to do, but i Wagely understand that you are trying to upload a customised image so that you can take the same image again for repeated usage. If my understanding is right here is the solution for you have a look at this : https://docs.docker.com/engine/tutorials/dockerimages/

Resources