Được TopGit lập chỉ mục từ metadata GitHub: containrrr/shepherd có 597 sao, viết chủ yếu bằng Shell. Docker swarm service for automatically updating your services whenever their image is refreshed
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
See the example docker-compose.yml and some more compose configs in the examples folder.
Configuration
Shepherd will try to update your services every 5 minutes by default. You can adjust this value using the SLEEP_TIME variable.
You can prevent services from being updated by appending them to the IGNORELIST_SERVICES variable. This should be a space-separated list of service names.
Alternatively you can specify a filter for the services you want updated using the FILTER_SERVICES variable. This can be anything accepted by the filtering flag in docker service ls.
You can set Shepherd to roll back a service to the previous version if the update fails by setting the ROLLBACK_ON_FAILURE variable.
You can control additional parameters for the docker service update and docker service update --rollback calls using the variables UPDATE_OPTIONS and ROLLBACK_OPTIONS.
If the docker service update takes too long then it will be killed after 5 minutes by default. You can adjust this value using the TIMEOUT variable.
You can enable private registry authentication by setting the WITH_REGISTRY_AUTH variable.
If you need to authenticate to a registry (for example in order to get around the Docker Hub rate limits), you can set the variable REGISTRY_USER and store the password either in a docker secret named shepherd_registry_password or in the environment variable REGISTRY_PASSWORD. If you are not using Docker Hub but a private registry, set REGISTRY_HOST to the hostname of your registry.
It is also possible to put all authentication information in a secret file. This approach is required if you need to authenticate with multiple accounts to the same registry (eg authenticate to the Gitlab registry for images from different projects). The content of the file is <TAB> separated and has 4 columns:
id: an identifier for the account. This should be an acceptable Docker config name.
registry: the registry to authenticate against, eg registry.gitlab.com
login: the user to authenticate as
password: the password to authenticate with
Lines starting with # are comments, and are ignored, as are invalid lines. Make sure this file ends with a new line. Otherwise your last line in the file will be ignored (here is why).
Here is an example:
blog registry.gitlab.com gitlab+deploy-token-5123674 ssw2Nrd2
Create and edit that file locally, eg at the location private/shepherd-registries-auth, and create the docker secret with
You also need to add a label shepherd.auth.config to the container to be updated specifying which line of the secret file should be used. The value of that label should be the id in the secret file:
You can enable connection to insecure private registry by setting the WITH_INSECURE_REGISTRY variable to true.
You can prevent pulling images from the registry by setting the WITH_NO_RESOLVE_IMAGE variable to true.
You can enable notifications on service update with apprise, using the apprise microservice and the APPRISE_SIDECAR_URL variable. See the file docker-compose.apprise.yml for an example.
You can enable old image autocleaning on service update by setting the IMAGE_AUTOCLEAN_LIMIT variable.
You can enable one shot running with RUN_ONCE_AND_EXIT variable.
If you care about log entries having the right timezone, you can set the TZ variable to the correct value (make sure to not include quotation marks in the variable value).
Note that the quotes in the command above are evaluated by your shell and are not part of the environment variable value! - See also the note in docker-compose.yml!
Running on a cron schedule
When running shepherd as described with a SLEEP_TIME, the de facto running times will drift the longer the container is running. If you want to run shepherd on a fixed schedule instead, it is recommended to pair it with swarm-cronjob:
Create a swarm-cronjob service as described in its documentation.
Set RUN_ONCE_AND_EXIT to true, replicas to 0 and restart_policy to condition: none. Add docker labels for the schedule.
See docker-compose.swarm-cronjob.yml for a full stack example which includes both shepherd as well as swarm-cronjob.
How does it work?
Shepherd just triggers updates by updating the image specification for each service, removing the current digest.
Most of the work is thankfully done by Docker which resolves the image tag, checks the registry for a newer version and updates running container tasks as needed.
Also, Docker handles all the work of applying rolling updates. So at least with replicated services, there should be no noticeable downtime.
containrrr/shepherd có 597 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/containrrr/shepherd. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
containrrr/shepherd có phải mã nguồn mở không?
Có — containrrr/shepherd phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/containrrr/shepherd.
containrrr/shepherd có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho containrrr/shepherd. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
containrrr/shepherd là gì?
containrrr/shepherd (containrrr/shepherd) là dự án Shell trên GitHub. Theo mô tả gốc: Docker swarm service for automatically updating your services whenever their image is refreshed
containrrr/shepherd so với các dự án Automation khác thế nào?
containrrr/shepherd được TopGit xếp vào nhóm Automation, với 597 sao GitHub và viết bằng Shell. Xem trang chủ đề Automation trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Cùng nhóm Automation còn repo nào?
containrrr/shepherd thuộc nhóm Automation trên TopGit, cùng 7 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về containrrr/shepherd ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/containrrr/shepherd là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về shepherd?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về shepherd.