All Projects → pdacity → docker_gc

pdacity / docker_gc

Licence: MIT license
Garbage collector for Docker Swarm / Автоматическая сборка мусора для Docker и Docker Swarm

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to docker gc

ob bulkstash
Bulk Stash is a docker rclone service to sync, or copy, files between different storage services. For example, you can copy files either to or from a remote storage services like Amazon S3 to Google Cloud Storage, or locally from your laptop to a remote storage.
Stars: ✭ 113 (+101.79%)
Mutual labels:  docker-service
microservices-demo.github.io
The Microservices Demo website.
Stars: ✭ 65 (+16.07%)
Mutual labels:  docker-swarm
ethibox
Open-source web apps hoster
Stars: ✭ 130 (+132.14%)
Mutual labels:  docker-swarm
hivemq4-docker-images
Official Docker Images for the Enterprise MQTT Broker HiveMQ
Stars: ✭ 18 (-67.86%)
Mutual labels:  docker-swarm
swarm-sync
GitOps for Docker Swarm
Stars: ✭ 62 (+10.71%)
Mutual labels:  docker-swarm
distributed-jmeter-docker
No description or website provided.
Stars: ✭ 56 (+0%)
Mutual labels:  docker-swarm
traefik-ondemand-service
Traefik ondemand service for the traefik ondemand plugin
Stars: ✭ 35 (-37.5%)
Mutual labels:  docker-swarm
microservices
Education & lessons learned from the field. Mainly focusing on AKS and Containers.
Stars: ✭ 16 (-71.43%)
Mutual labels:  docker-swarm
trafficjam
A Docker firewall for your reverse proxy network
Stars: ✭ 79 (+41.07%)
Mutual labels:  docker-swarm
swarm-launcher
A docker image to allow the launch of container in docker swarm, with options normally unavailable to swarm mode
Stars: ✭ 28 (-50%)
Mutual labels:  docker-swarm
swarm-router
Scalable stateless «zero config» service-name ingress for docker swarm mode with a fresh more secure approach
Stars: ✭ 58 (+3.57%)
Mutual labels:  docker-swarm
addon-portainer
Portainer - Home Assistant Community Add-ons
Stars: ✭ 83 (+48.21%)
Mutual labels:  docker-swarm
docker-box
A lightweight docker application platform for single servers.
Stars: ✭ 62 (+10.71%)
Mutual labels:  docker-swarm
jupyterhub-deploy-swarm
A DockerSwarm Jupyterhub setup, which uses a NFS Server running in a Docker Container for persistent storage
Stars: ✭ 19 (-66.07%)
Mutual labels:  docker-swarm
swarm-gcp-faas
Setup OpenFaaS on Google Cloud with Terraform, Docker Swarm and Weave
Stars: ✭ 15 (-73.21%)
Mutual labels:  docker-swarm
docker-elasticsearch
Multi-architecture (arm, x86) Docker image for Elasticsearch
Stars: ✭ 14 (-75%)
Mutual labels:  docker-swarm
shokku
An open source scalable blockchain infrastructure for Ubiq, Ethereum, POA and IPFS that runs on Kubernetes
Stars: ✭ 33 (-41.07%)
Mutual labels:  docker-swarm
dockerdoo
Flexible and streamlined Odoo image to be used with docker-compose, docker swarm or Kubernetes. Fully integrated to with VSCode devcontainers
Stars: ✭ 55 (-1.79%)
Mutual labels:  docker-swarm
flask-docker-swarm
Running Flask on Docker Swarm
Stars: ✭ 29 (-48.21%)
Mutual labels:  docker-swarm
clusterplex
ClusterPlex is basically an extended version of Plex, which supports distributed Workers across a cluster to handle transcoding requests.
Stars: ✭ 123 (+119.64%)
Mutual labels:  docker-swarm

Garbage collector for Docker Swarm

Awesome Docker Docker Cloud Build Status Docker stuff PizzaWare Tea powered

About

Image for automatic removing unused Docker Swarm objects. Also works just as Docker Service.

By default these types of objects are deleted:

  • container
  • volume
  • network

Configuration

Set config parameters in the yml file:

  • AGE - the max time for resource to be unused (format: timestamp or Go duration strings (10m, 1h30m))
  • SLEEP - the time frame between checking for unused objects (format: timestamp or Go duration strings (10m, 1h30m))
  • STICKY_LABEL - do not remove image with this label

Building image with STICKY_LABEL

If you need to protect an image from automatic deletion use LABEL directive, for example: persistent_image=true. To do it just create Dockerfile for you image .

FROM <IMAGENAME>
LABEL persistent_image=true

Before run the stack build the image from Dockerfile mentioned above:

docker-compose.yaml

...
  <SERVICENAME>
    container_name: <CONTAINERNAME>
    build:
      context: .
...
  • <IMAGENAME> - the image which is protected from automatic deletion
  • <SERVICENAME> - service name in the stack
  • <CONTAINERNAME> - container name (optionally)

Also you should set STICKY_LABEL: persisten_image=true in the docker_gc run variables

Run

  • docker-stack.yml - to deploy the service in Docker Swarm
  • docker-compose.yml - to run just a Docker Service

Docker Hub

Prebuild docker image on hub.docker.com - https://hub.docker.com/r/pdacity/docker_gc


Сборщик мусора для Docker Swarm и Docker

Docker Cloud Build Status Docker stuff PizzaWare Tea powered

О проекте

Образ для автоматической очистки неиспользуемых обьектов в Docker Swarm (работает и просто как Docker Service )

По умолчанию удаляются следующие типы обьектов:

  • container
  • volume
  • network

Настройка

Для работы необходимо задать параметры yml файле:

  • AGE - срок в формате timestamp или Go duration strings (10m, 1h30m) после которого неиспользуемые ресурсы будут удалены
  • SLEEP - периодичность проверки в формате timestamp или Go duration strings (10m, 1h30m)
  • STICKY_LABEL - не удалять образа с этой меткой

Сборка образа с STICKY_LABEL

В случае если необходимо защитить какой либо из образов от автоматического удаления необходимо добавить к образу label, например persistent_image=true Для этого создайте Dockerfile для образа <IMAGENAME>

FROM <IMAGENAME>
LABEL persistent_image=true

При запуске стека необходимо собрать образ из приведенного выше Dockerfile

docker-compose.yaml

...
  <SERVICENAME>
    container_name: <CONTAINERNAME>
    build:
      context: .
...

где <IMAGENAME> - название образа который должен быть защищен от автоматического удаления, <SERVICENAME> - название сервиса в стеке, <CONTAINERNAME> имя контейнера (опционально)

И задайте STICKY_LABEL: persistent_image=true в переменных запуска docker_gc

Запуск

  • docker-stack.yml - для деплоя сервиса в Docker swarm
  • docker-compose.yml - для запуска Docker Service

Docker Hub

Готовый собранный образ на hub.docker.com - https://hub.docker.com/r/pdacity/docker_gc


References: English version of the documentation - https://habr.com/en/users/AlexanderTyutin/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].