docker-cleanup | DEPRECATED Automatic Docker image , container | Continuous Deployment library
kandi X-RAY | docker-cleanup Summary
kandi X-RAY | docker-cleanup Summary
This image will periodically clean up exited containers and remove images and volumes that aren't in use by a running container. Based on tutumcloud/image-cleanup and chadoe/docker-cleanup-volumes with some small fixes. Normally any Docker containers that exit are still kept on disk until docker rm -v is used to clean them up. Similarly any images that aren't used any more are kept around. For a cluster node that see lots of containers start and stop, large amounts of exited containers and old image versions can fill up the disk. A Jenkins build slave has the same issues, but can also suffer from SNAPSHOT images being continuously rebuilt and causing untagged images to be left around.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of docker-cleanup
docker-cleanup Key Features
docker-cleanup Examples and Code Snippets
Community Discussions
Trending Discussions on docker-cleanup
QUESTION
Disclaimer: I aware the /var/run/docker.sock
issue is way common and there are lots of posts out there on it (although most if not all can be summed up to adding the running user to the docker permissions group). I tried all the those instructions and it still does not help me, in redhat.
I have two containers, one Ubuntu
and one running Redhat 7.9
.
My problem is specifically not being able to run - in the redhat container only - a call to Docker.Dotnet's ListImages
(fails with permission denied in /var/run/docker.sock
). In the beginning, I was not able to issue any docker command without prefixing it with sudo. I then added the running user to the docker permissions group, and can issue docker commands without sudo.
But Docker.Dotnet ListImages (which is simply a wrapper to docker api's images/json endpoint) still fails with the permission denied error on docker.sock. I tried all recommended here, to no avail.
I thought perhaps I should add the User=root (although this is not present in my Ubuntu service file, and therefore does not make much sense). I then realized that the ubuntu and redhat docker service files differ considerably.
Ubuntu:
...ANSWER
Answered 2021-Apr-04 at 08:16At the end... my problem was that in my Redhat installation, as opposed to my Ubuntu, we had SELinux enabled.
Disabling it finally had curl --unix-socket /run/docker.sock http://docker/images/json
working from within my composer containers.
To disable Selinux: edit (you may need to impersonate as root using sudo su root
) file /etc/selinux/config - replace SELINUX=enforcing
with SELINUX=disabled
Restart the linux server and that's it.
Remark: This may obviously not be an acceptable solution in a production environment. If this is your case, you will need to properly configure SELinux permissions settings. I was simply assigned a task to identify why this problem was happening in one of our dev machines, so disabling it suffices my needs for now.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install docker-cleanup
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page