diff --git a/.all-contributorsrc b/.all-contributorsrc deleted file mode 100644 index 270f462..0000000 --- a/.all-contributorsrc +++ /dev/null @@ -1,889 +0,0 @@ -{ - "files": [ - "README.md" - ], - "imageSize": 100, - "commit": false, - "contributors": [ - { - "login": "piksel", - "name": "nils måsén", - "avatar_url": "https://avatars2.githubusercontent.com/u/807383?v=4", - "profile": "https://piksel.se", - "contributions": [ - "code", - "doc", - "maintenance", - "review" - ] - }, - { - "login": "simskij", - "name": "Simon Aronsson", - "avatar_url": "https://avatars0.githubusercontent.com/u/1596025?v=4", - "profile": "http://simme.dev", - "contributions": [ - "code", - "doc", - "maintenance", - "review" - ] - }, - { - "login": "Codelica", - "name": "James", - "avatar_url": "https://avatars3.githubusercontent.com/u/386101?v=4", - "profile": "http://codelica.com", - "contributions": [ - "test", - "ideas" - ] - }, - { - "login": "KopfKrieg", - "name": "Florian", - "avatar_url": "https://avatars2.githubusercontent.com/u/5047813?v=4", - "profile": "https://kopfkrieg.org", - "contributions": [ - "review", - "doc" - ] - }, - { - "login": "bdehamer", - "name": "Brian DeHamer", - "avatar_url": "https://avatars1.githubusercontent.com/u/398027?v=4", - "profile": "https://github.com/bdehamer", - "contributions": [ - "code", - "maintenance" - ] - }, - { - "login": "rosscado", - "name": "Ross Cadogan", - "avatar_url": "https://avatars1.githubusercontent.com/u/16578183?v=4", - "profile": "https://github.com/rosscado", - "contributions": [ - "code" - ] - }, - { - "login": "stffabi", - "name": "stffabi", - "avatar_url": "https://avatars0.githubusercontent.com/u/9464631?v=4", - "profile": "https://github.com/stffabi", - "contributions": [ - "code", - "maintenance" - ] - }, - { - "login": "ATCUSA", - "name": "Austin", - "avatar_url": "https://avatars3.githubusercontent.com/u/3581228?v=4", - "profile": "https://github.com/ATCUSA", - "contributions": [ - "doc" - ] - }, - { - "login": "davidgardner11", - "name": "David Gardner", - "avatar_url": "https://avatars2.githubusercontent.com/u/6181487?v=4", - "profile": "https://labs.ctl.io", - "contributions": [ - "review", - "doc" - ] - }, - { - "login": "dolanor", - "name": "Tanguy ⧓ Herrmann", - "avatar_url": "https://avatars3.githubusercontent.com/u/928722?v=4", - "profile": "https://github.com/dolanor", - "contributions": [ - "code" - ] - }, - { - "login": "rdamazio", - "name": "Rodrigo Damazio Bovendorp", - "avatar_url": "https://avatars3.githubusercontent.com/u/997641?v=4", - "profile": "https://github.com/rdamazio", - "contributions": [ - "code", - "doc" - ] - }, - { - "login": "thelamer", - "name": "Ryan Kuba", - "avatar_url": "https://avatars3.githubusercontent.com/u/1852688?v=4", - "profile": "https://www.taisun.io/", - "contributions": [ - "infra" - ] - }, - { - "login": "cnrmck", - "name": "cnrmck", - "avatar_url": "https://avatars2.githubusercontent.com/u/22061955?v=4", - "profile": "https://github.com/cnrmck", - "contributions": [ - "doc" - ] - }, - { - "login": "haswalt", - "name": "Harry Walter", - "avatar_url": "https://avatars3.githubusercontent.com/u/338588?v=4", - "profile": "http://harrywalter.co.uk", - "contributions": [ - "code" - ] - }, - { - "login": "Robotex", - "name": "Robotex", - "avatar_url": "https://avatars3.githubusercontent.com/u/74515?v=4", - "profile": "http://projectsperanza.com", - "contributions": [ - "doc" - ] - }, - { - "login": "ubergesundheit", - "name": "Gerald Pape", - "avatar_url": "https://avatars0.githubusercontent.com/u/1494211?v=4", - "profile": "http://geraldpape.io", - "contributions": [ - "doc" - ] - }, - { - "login": "fomk", - "name": "fomk", - "avatar_url": "https://avatars0.githubusercontent.com/u/17636183?v=4", - "profile": "https://github.com/fomk", - "contributions": [ - "code" - ] - }, - { - "login": "svengo", - "name": "Sven Gottwald", - "avatar_url": "https://avatars3.githubusercontent.com/u/2502366?v=4", - "profile": "https://github.com/svengo", - "contributions": [ - "infra" - ] - }, - { - "login": "techknowlogick", - "name": "techknowlogick", - "avatar_url": "https://avatars1.githubusercontent.com/u/164197?v=4", - "profile": "https://liberapay.com/techknowlogick/", - "contributions": [ - "code" - ] - }, - { - "login": "waja", - "name": "waja", - "avatar_url": "https://avatars1.githubusercontent.com/u/1449568?v=4", - "profile": "http://log.c5t.org/about/", - "contributions": [ - "doc" - ] - }, - { - "login": "salbertson", - "name": "Scott Albertson", - "avatar_url": "https://avatars2.githubusercontent.com/u/154463?v=4", - "profile": "http://scottalbertson.com", - "contributions": [ - "doc" - ] - }, - { - "login": "huddlesj", - "name": "Jason Huddleston", - "avatar_url": "https://avatars1.githubusercontent.com/u/11966535?v=4", - "profile": "https://github.com/huddlesj", - "contributions": [ - "doc" - ] - }, - { - "login": "napstr", - "name": "Napster", - "avatar_url": "https://avatars3.githubusercontent.com/u/6048348?v=4", - "profile": "https://npstr.space/", - "contributions": [ - "code" - ] - }, - { - "login": "darknode", - "name": "Maxim", - "avatar_url": "https://avatars1.githubusercontent.com/u/809429?v=4", - "profile": "https://github.com/darknode", - "contributions": [ - "code", - "doc" - ] - }, - { - "login": "mxschmitt", - "name": "Max Schmitt", - "avatar_url": "https://avatars0.githubusercontent.com/u/17984549?v=4", - "profile": "https://schmitt.cat", - "contributions": [ - "doc" - ] - }, - { - "login": "cron410", - "name": "cron410", - "avatar_url": "https://avatars1.githubusercontent.com/u/3082899?v=4", - "profile": "https://github.com/cron410", - "contributions": [ - "doc" - ] - }, - { - "login": "Cardoso222", - "name": "Paulo Henrique", - "avatar_url": "https://avatars3.githubusercontent.com/u/7026517?v=4", - "profile": "https://github.com/Cardoso222", - "contributions": [ - "doc" - ] - }, - { - "login": "belak", - "name": "Kaleb Elwert", - "avatar_url": "https://avatars0.githubusercontent.com/u/107097?v=4", - "profile": "https://coded.io", - "contributions": [ - "doc" - ] - }, - { - "login": "wmbutler", - "name": "Bill Butler", - "avatar_url": "https://avatars1.githubusercontent.com/u/1254810?v=4", - "profile": "https://github.com/wmbutler", - "contributions": [ - "doc" - ] - }, - { - "login": "mariotacke", - "name": "Mario Tacke", - "avatar_url": "https://avatars2.githubusercontent.com/u/4942019?v=4", - "profile": "https://www.mariotacke.io", - "contributions": [ - "code" - ] - }, - { - "login": "mrw34", - "name": "Mark Woodbridge", - "avatar_url": "https://avatars2.githubusercontent.com/u/1101318?v=4", - "profile": "https://markwoodbridge.com", - "contributions": [ - "code" - ] - }, - { - "login": "Ansem93", - "name": "Ansem93", - "avatar_url": "https://avatars3.githubusercontent.com/u/6626218?v=4", - "profile": "https://github.com/Ansem93", - "contributions": [ - "doc" - ] - }, - { - "login": "lukapeschke", - "name": "Luka Peschke", - "avatar_url": "https://avatars1.githubusercontent.com/u/17085536?v=4", - "profile": "https://github.com/lukapeschke", - "contributions": [ - "code", - "doc" - ] - }, - { - "login": "zoispag", - "name": "Zois Pagoulatos", - "avatar_url": "https://avatars0.githubusercontent.com/u/21138205?v=4", - "profile": "https://github.com/zoispag", - "contributions": [ - "code", - "review", - "maintenance" - ] - }, - { - "login": "alexandremenif", - "name": "Alexandre Menif", - "avatar_url": "https://avatars0.githubusercontent.com/u/16152103?v=4", - "profile": "https://alexandre.menif.name", - "contributions": [ - "code" - ] - }, - { - "login": "chugunov", - "name": "Andrey", - "avatar_url": "https://avatars1.githubusercontent.com/u/4140479?v=4", - "profile": "https://github.com/chugunov", - "contributions": [ - "doc" - ] - }, - { - "login": "noplanman", - "name": "Armando Lüscher", - "avatar_url": "https://avatars3.githubusercontent.com/u/9423417?v=4", - "profile": "https://noplanman.ch", - "contributions": [ - "doc" - ] - }, - { - "login": "rjbudke", - "name": "Ryan Budke", - "avatar_url": "https://avatars2.githubusercontent.com/u/273485?v=4", - "profile": "https://github.com/rjbudke", - "contributions": [ - "doc" - ] - }, - { - "login": "kaloyan-raev", - "name": "Kaloyan Raev", - "avatar_url": "https://avatars2.githubusercontent.com/u/468091?v=4", - "profile": "http://kaloyan.raev.name", - "contributions": [ - "code", - "test" - ] - }, - { - "login": "sixth", - "name": "sixth", - "avatar_url": "https://avatars3.githubusercontent.com/u/11591445?v=4", - "profile": "https://github.com/sixth", - "contributions": [ - "doc" - ] - }, - { - "login": "foosel", - "name": "Gina Häußge", - "avatar_url": "https://avatars0.githubusercontent.com/u/83657?v=4", - "profile": "https://foosel.net", - "contributions": [ - "code" - ] - }, - { - "login": "8ear", - "name": "Max H.", - "avatar_url": "https://avatars0.githubusercontent.com/u/10329648?v=4", - "profile": "https://github.com/8ear", - "contributions": [ - "code" - ] - }, - { - "login": "pjknkda", - "name": "Jungkook Park", - "avatar_url": "https://avatars0.githubusercontent.com/u/4986524?v=4", - "profile": "https://pjknkda.github.io", - "contributions": [ - "doc" - ] - }, - { - "login": "jnidzwetzki", - "name": "Jan Kristof Nidzwetzki", - "avatar_url": "https://avatars1.githubusercontent.com/u/5753622?v=4", - "profile": "https://achfrag.net", - "contributions": [ - "doc" - ] - }, - { - "login": "mindrunner", - "name": "lukas", - "avatar_url": "https://avatars0.githubusercontent.com/u/1413542?v=4", - "profile": "https://www.lukaselsner.de", - "contributions": [ - "code" - ] - }, - { - "login": "codingCoffee", - "name": "Ameya Shenoy", - "avatar_url": "https://avatars3.githubusercontent.com/u/13611153?v=4", - "profile": "https://codingcoffee.dev", - "contributions": [ - "code" - ] - }, - { - "login": "raymondelooff", - "name": "Raymon de Looff", - "avatar_url": "https://avatars0.githubusercontent.com/u/9716806?v=4", - "profile": "https://github.com/raymondelooff", - "contributions": [ - "code" - ] - }, - { - "login": "jsclayton", - "name": "John Clayton", - "avatar_url": "https://avatars2.githubusercontent.com/u/704034?v=4", - "profile": "http://codemonkeylabs.com", - "contributions": [ - "code" - ] - }, - { - "login": "Germs2004", - "name": "Germs2004", - "avatar_url": "https://avatars2.githubusercontent.com/u/5519340?v=4", - "profile": "https://github.com/Germs2004", - "contributions": [ - "doc" - ] - }, - { - "login": "lukwil", - "name": "Lukas Willburger", - "avatar_url": "https://avatars1.githubusercontent.com/u/30203234?v=4", - "profile": "https://github.com/lukwil", - "contributions": [ - "code" - ] - }, - { - "login": "auanasgheps", - "name": "Oliver Cervera", - "avatar_url": "https://avatars2.githubusercontent.com/u/20586878?v=4", - "profile": "https://github.com/auanasgheps", - "contributions": [ - "doc" - ] - }, - { - "login": "victorcmoura", - "name": "Victor Moura", - "avatar_url": "https://avatars1.githubusercontent.com/u/26290053?v=4", - "profile": "https://github.com/victorcmoura", - "contributions": [ - "test", - "code", - "doc" - ] - }, - { - "login": "mbrandau", - "name": "Maximilian Brandau", - "avatar_url": "https://avatars3.githubusercontent.com/u/12972798?v=4", - "profile": "https://github.com/mbrandau", - "contributions": [ - "code", - "test" - ] - }, - { - "login": "aneisch", - "name": "Andrew", - "avatar_url": "https://avatars1.githubusercontent.com/u/6991461?v=4", - "profile": "https://github.com/aneisch", - "contributions": [ - "doc" - ] - }, - { - "login": "sixcorners", - "name": "sixcorners", - "avatar_url": "https://avatars0.githubusercontent.com/u/585501?v=4", - "profile": "https://github.com/sixcorners", - "contributions": [ - "doc" - ] - }, - { - "login": "arnested", - "name": "Arne Jørgensen", - "avatar_url": "https://avatars2.githubusercontent.com/u/190005?v=4", - "profile": "https://arnested.dk", - "contributions": [ - "test", - "review" - ] - }, - { - "login": "patski123", - "name": "PatSki123", - "avatar_url": "https://avatars1.githubusercontent.com/u/19295295?v=4", - "profile": "https://github.com/patski123", - "contributions": [ - "doc" - ] - }, - { - "login": "Saicheg", - "name": "Valentine Zavadsky", - "avatar_url": "https://avatars2.githubusercontent.com/u/624999?v=4", - "profile": "https://rubyroidlabs.com/", - "contributions": [ - "code", - "doc", - "test" - ] - }, - { - "login": "bopoh24", - "name": "Alexander Voronin", - "avatar_url": "https://avatars2.githubusercontent.com/u/4086631?v=4", - "profile": "https://github.com/bopoh24", - "contributions": [ - "code", - "bug" - ] - }, - { - "login": "ogmueller", - "name": "Oliver Mueller", - "avatar_url": "https://avatars0.githubusercontent.com/u/788989?v=4", - "profile": "http://www.teqneers.de", - "contributions": [ - "doc" - ] - }, - { - "login": "tammert", - "name": "Sebastiaan Tammer", - "avatar_url": "https://avatars0.githubusercontent.com/u/8885250?v=4", - "profile": "https://github.com/tammert", - "contributions": [ - "code" - ] - }, - { - "login": "miosame", - "name": "miosame", - "avatar_url": "https://avatars1.githubusercontent.com/u/8201077?v=4", - "profile": "https://github.com/Miosame", - "contributions": [ - "doc" - ] - }, - { - "login": "andrewjmetzger", - "name": "Andrew Metzger", - "avatar_url": "https://avatars3.githubusercontent.com/u/590246?v=4", - "profile": "https://mtz.gr", - "contributions": [ - "bug", - "example" - ] - }, - { - "login": "pgrimaud", - "name": "Pierre Grimaud", - "avatar_url": "https://avatars1.githubusercontent.com/u/1866496?v=4", - "profile": "https://github.com/pgrimaud", - "contributions": [ - "doc" - ] - }, - { - "login": "mattdoran", - "name": "Matt Doran", - "avatar_url": "https://avatars0.githubusercontent.com/u/577779?v=4", - "profile": "https://github.com/mattdoran", - "contributions": [ - "doc" - ] - }, - { - "login": "MihailITPlace", - "name": "MihailITPlace", - "avatar_url": "https://avatars2.githubusercontent.com/u/28401551?v=4", - "profile": "https://github.com/MihailITPlace", - "contributions": [ - "code" - ] - }, - { - "login": "bugficks", - "name": "bugficks", - "avatar_url": "https://avatars1.githubusercontent.com/u/2992895?v=4", - "profile": "https://github.com/bugficks", - "contributions": [ - "code", - "doc" - ] - }, - { - "login": "MichaelSp", - "name": "Michael", - "avatar_url": "https://avatars0.githubusercontent.com/u/448282?v=4", - "profile": "https://github.com/MichaelSp", - "contributions": [ - "code" - ] - }, - { - "login": "jokay", - "name": "D. Domig", - "avatar_url": "https://avatars0.githubusercontent.com/u/18613935?v=4", - "profile": "https://github.com/jokay", - "contributions": [ - "doc" - ] - }, - { - "login": "osheroff", - "name": "Ben Osheroff", - "avatar_url": "https://avatars1.githubusercontent.com/u/260084?v=4", - "profile": "https://maxwells-daemon.io", - "contributions": [ - "code" - ] - }, - { - "login": "dhet", - "name": "David H.", - "avatar_url": "https://avatars3.githubusercontent.com/u/2668621?v=4", - "profile": "https://github.com/dhet", - "contributions": [ - "code" - ] - }, - { - "login": "chander", - "name": "Chander Ganesan", - "avatar_url": "https://avatars1.githubusercontent.com/u/671887?v=4", - "profile": "http://www.gridgeo.com", - "contributions": [ - "doc" - ] - }, - { - "login": "yrien30", - "name": "yrien30", - "avatar_url": "https://avatars1.githubusercontent.com/u/26816162?v=4", - "profile": "https://github.com/yrien30", - "contributions": [ - "code" - ] - }, - { - "login": "ksurl", - "name": "ksurl", - "avatar_url": "https://avatars1.githubusercontent.com/u/1371562?v=4", - "profile": "https://github.com/ksurl", - "contributions": [ - "doc", - "code", - "infra" - ] - }, - { - "login": "rg9400", - "name": "rg9400", - "avatar_url": "https://avatars2.githubusercontent.com/u/39887349?v=4", - "profile": "https://github.com/rg9400", - "contributions": [ - "code" - ] - }, - { - "login": "tkalus", - "name": "Turtle Kalus", - "avatar_url": "https://avatars2.githubusercontent.com/u/287181?v=4", - "profile": "https://github.com/tkalus", - "contributions": [ - "code" - ] - }, - { - "login": "SrihariThalla", - "name": "Srihari Thalla", - "avatar_url": "https://avatars1.githubusercontent.com/u/7479937?v=4", - "profile": "https://github.com/SrihariThalla", - "contributions": [ - "doc" - ] - }, - { - "login": "nymous", - "name": "Thomas Gaudin", - "avatar_url": "https://avatars1.githubusercontent.com/u/4216559?v=4", - "profile": "https://nymous.io", - "contributions": [ - "doc" - ] - }, - { - "login": "hydrargyrum", - "name": "hydrargyrum", - "avatar_url": "https://avatars.githubusercontent.com/u/2804645?v=4", - "profile": "https://indigo.re/", - "contributions": [ - "doc" - ] - }, - { - "login": "reinout", - "name": "Reinout van Rees", - "avatar_url": "https://avatars.githubusercontent.com/u/121433?v=4", - "profile": "https://reinout.vanrees.org", - "contributions": [ - "doc" - ] - }, - { - "login": "DasSkelett", - "name": "DasSkelett", - "avatar_url": "https://avatars.githubusercontent.com/u/28812678?v=4", - "profile": "https://github.com/DasSkelett", - "contributions": [ - "code" - ] - }, - { - "login": "zenjabba", - "name": "zenjabba", - "avatar_url": "https://avatars.githubusercontent.com/u/679864?v=4", - "profile": "https://github.com/zenjabba", - "contributions": [ - "doc" - ] - }, - { - "login": "djquan", - "name": "Dan Quan", - "avatar_url": "https://avatars.githubusercontent.com/u/3526705?v=4", - "profile": "https://quan.io", - "contributions": [ - "doc" - ] - }, - { - "login": "modem7", - "name": "modem7", - "avatar_url": "https://avatars.githubusercontent.com/u/4349962?v=4", - "profile": "https://github.com/modem7", - "contributions": [ - "doc" - ] - }, - { - "login": "hypnoglow", - "name": "Igor Zibarev", - "avatar_url": "https://avatars.githubusercontent.com/u/4853075?v=4", - "profile": "https://github.com/hypnoglow", - "contributions": [ - "code" - ] - }, - { - "login": "patricegautier", - "name": "Patrice", - "avatar_url": "https://avatars.githubusercontent.com/u/38435239?v=4", - "profile": "https://github.com/patricegautier", - "contributions": [ - "code" - ] - }, - { - "login": "jamesmacwhite", - "name": "James White", - "avatar_url": "https://avatars.githubusercontent.com/u/8067792?v=4", - "profile": "http://jamesw.link/me", - "contributions": [ - "doc" - ] - }, - { - "login": "Foxite", - "name": "Dirk Kok", - "avatar_url": "https://avatars.githubusercontent.com/u/20421657?v=4", - "profile": "https://ko-fi.com/foxite", - "contributions": [ - "code" - ] - }, - { - "login": "EDIflyer", - "name": "EDIflyer", - "avatar_url": "https://avatars.githubusercontent.com/u/13610277?v=4", - "profile": "https://github.com/EDIflyer", - "contributions": [ - "doc" - ] - }, - { - "login": "jauderho", - "name": "Jauder Ho", - "avatar_url": "https://avatars.githubusercontent.com/u/13562?v=4", - "profile": "https://github.com/jauderho", - "contributions": [ - "code" - ] - }, - { - "login": "andriibratanin", - "name": "Andrii Bratanin", - "avatar_url": "https://avatars.githubusercontent.com/u/20169213?v=4", - "profile": "https://github.com/andriibratanin" - }, - { - "login": "IAmTamal", - "name": "Tamal Das ", - "avatar_url": "https://avatars.githubusercontent.com/u/72851613?v=4", - "profile": "https://tamal.vercel.app/", - "contributions": [ - "doc" - ] - }, - { - "login": "testwill", - "name": "guangwu", - "avatar_url": "https://avatars.githubusercontent.com/u/8717479?v=4", - "profile": "https://github.com/testwill", - "contributions": [ - "doc" - ] - }, - { - "login": "nothub", - "name": "Florian Hübner", - "avatar_url": "https://avatars.githubusercontent.com/u/48992448?v=4", - "profile": "http://hub.lol", - "contributions": [ - "doc", - "code" - ] - } - ], - "contributorsPerLine": 7, - "projectName": "watchtower", - "projectOwner": "containrrr", - "repoType": "github", - "repoHost": "https://github.com", - "commitConvention": "none", - "skipCi": true, - "commitType": "docs" -} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 42fd645..7ff8c10 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,8 +1 @@ -pkg/notifications/smtp.go @piksel -pkg/notifications/email.go @piksel -pkg/notifications/shoutrrr.go @piksel @simskij @arnested -pkg/container/* @simskij -pkg/api/* @victorcmoura -.devbots/* @simskij -.github/* @simskij -docs/* @containrrr/watchtower-contributors +* @beatkind diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 01cc777..09b00fa 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: Ask a question - url: https://github.com/containrrr/watchtower/discussions + url: https://github.com/beatkind/watchtower/discussions about: Ask questions and discuss with other community members diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index fe53bc9..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,21 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "github-actions" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" - - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" - - - package-ecosystem: "docker" # See documentation for possible values - directory: "/dockerfiles" # Location of package manifests - schedule: - interval: "weekly" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index c479d05..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,72 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: [main] - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - - cron: '0 1 * * 4' - workflow_dispatch: - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['go'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dependabot-approve.yml b/.github/workflows/dependabot-approve.yml deleted file mode 100644 index 46f9d18..0000000 --- a/.github/workflows/dependabot-approve.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Auto approve dependabot PRs - -on: pull_request_target - -jobs: - auto-approve: - runs-on: ubuntu-latest - permissions: - pull-requests: write - if: github.actor == 'dependabot[bot]' - steps: - - uses: hmarr/auto-approve-action@v3 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index 83ff8a0..0000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Greetings - -on: - # Runs in the context of the target (containrrr/watchtower) repository, and as such has access to GITHUB_TOKEN - pull_request_target: - types: [opened] - issues: - types: [opened] - -jobs: - greeting: - runs-on: ubuntu-latest - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: > - Hi there! 👋🏼 - As you're new to this repo, we'd like to suggest that you read our [code of conduct](https://github.com/containrrr/.github/blob/master/CODE_OF_CONDUCT.md) - as well as our [contribution guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md). - Thanks a bunch for opening your first issue! 🙏 - pr-message: > - Congratulations on opening your first pull request! We'll get back to you as soon as possible. In the meantime, please make sure you've updated the documentation to reflect your changes and have added test automation as needed. Thanks! 🙏🏼 diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yaml similarity index 88% rename from .github/workflows/publish-docs.yml rename to .github/workflows/publish-docs.yaml index 4818e54..5e6eb97 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yaml @@ -18,15 +18,15 @@ jobs: with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: 1.20.x + go-version: 1.24.x - name: Build tplprev run: scripts/build-tplprev.sh - name: Setup python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.13' cache: 'pip' cache-dependency-path: | docs-requirements.txt diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yaml similarity index 56% rename from .github/workflows/pull-request.yml rename to .github/workflows/pull-request.yaml index f6866af..6fbafb7 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yaml @@ -6,30 +6,29 @@ on: branches: - main +permissions: + contents: read + jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.20.x - - uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc #v1.3.0 - with: - version: "2023.1.6" - install-go: "false" # StaticCheck uses go v1.17 which does not support `any` + # lint: + # name: Lint + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-go@v5 + # with: + # go-version: stable + # - name: golangci-lint + # uses: golangci/golangci-lint-action@v6 + # with: + # version: v1.60 test: name: Test strategy: fail-fast: false matrix: go-version: - - 1.20.x + - 1.24.x platform: - macos-latest - windows-latest @@ -41,14 +40,14 @@ jobs: with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: 1.20.x + go-version: 1.24.x - name: Run tests run: | - go test -v -coverprofile coverage.out -covermode atomic ./... + go test -v -coverprofile coverage.out -covermode atomic ./... - name: Publish coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} build: @@ -60,11 +59,11 @@ jobs: with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: 1.20.x + go-version: 1.24.x - name: Build - uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v3 + uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6 with: version: v0.155.0 args: --snapshot --skip-publish --debug diff --git a/.github/workflows/release-dev.yaml b/.github/workflows/release-dev.yaml index 95ee68d..e0fee53 100644 --- a/.github/workflows/release-dev.yaml +++ b/.github/workflows/release-dev.yaml @@ -6,6 +6,12 @@ on: branches: - main +permissions: + contents: read + packages: write + attestations: write + id-token: write + jobs: build: runs-on: ubuntu-latest @@ -14,9 +20,9 @@ jobs: with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: 1.20.x + go-version: 1.24.x - name: Build run: ./build.sh test: @@ -24,36 +30,120 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: 1.20.x + go-version: 1.24.x - name: Test - run: go test -v -coverprofile coverage.out -covermode atomic ./... + run: go test -v -coverprofile coverage.out -covermode atomic ./... - name: Publish coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - publish: + publish-docker-hub: needs: - build - test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Publish to Docker Hub - uses: jerray/publish-docker-action@87d84711629b0dc9f6bb127b568413cc92a2088e #master@2022-10-14 + # - uses: actions/checkout@v4 + # - name: Publish to Docker Hub + # uses: jerray/publish-docker-action@87d84711629b0dc9f6bb127b568413cc92a2088e #master@2022-10-14 + # with: + # username: ${{ secrets.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} + # file: dockerfiles/Dockerfile.self-contained + # repository: beatkind/watchtower + # tags: latest-dev + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@3d100841f68d4548bf57e52eb27bd33ec5069f55 with: username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - file: dockerfiles/Dockerfile.self-contained - repository: containrrr/watchtower - tags: latest-dev - - name: Publish to GHCR - uses: jerray/publish-docker-action@87d84711629b0dc9f6bb127b568413cc92a2088e #master@2022-10-14 + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@b798ed8388581f6f002541048b6458ca2c4ba442 with: - username: ${{ secrets.BOT_USERNAME }} - password: ${{ secrets.BOT_GHCR_PAT }} + images: beatkind/watchtower + labels: | + org.opencontainers.image.created={{date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]'}} + org.opencontainers.image.authors=${{github.actor}} + org.opencontainers.image.source=${{github.repository}} + org.opencontainers.image.documentation=https://watchtower.devcdn.net + org.opencontainers.image.version=latest-dev + org.opencontainers.image.revision=${{github.sha}} + org.opencontainers.image.vendor=beatkind + org.opencontainers.image.licenses=Apache-2.0 + tags: | + type=raw,value=latest-dev + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 + with: + context: . file: dockerfiles/Dockerfile.self-contained - registry: ghcr.io - repository: containrrr/watchtower - tags: latest-dev + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v2 + with: + subject-name: index.docker.io/beatkind/watchtower + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: false + + publish-github: + needs: + - build + - test + env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Log in to the Container registry + uses: docker/login-action@3d100841f68d4548bf57e52eb27bd33ec5069f55 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@b798ed8388581f6f002541048b6458ca2c4ba442 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + labels: | + org.opencontainers.image.created={{date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]'}} + org.opencontainers.image.authors=${{github.actor}} + org.opencontainers.image.source=${{github.repository}} + org.opencontainers.image.documentation=https://watchtower.devcdn.net + org.opencontainers.image.version=latest-dev + org.opencontainers.image.revision=${{github.sha}} + org.opencontainers.image.vendor=beatkind + org.opencontainers.image.licenses=Apache-2.0 + tags: | + type=raw,value=latest-dev + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 + with: + context: . + file: dockerfiles/Dockerfile.self-contained + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v2 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: false diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..58d23cd --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,108 @@ +name: Release (Production) + +on: + workflow_dispatch: {} + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + - "**/v[0-9]+.[0-9]+.[0-9]+" + +permissions: + contents: write + +jobs: + # lint: + # name: Lint + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-go@v5 + # with: + # go-version: stable + # - name: golangci-lint + # uses: golangci/golangci-lint-action@v6 + # with: + # version: v1.60 + + test: + name: Test + strategy: + matrix: + go-version: + - 1.23.x + platform: + - ubuntu-latest + - macos-latest + - windows-latest + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.24.x + - name: Run tests + run: | + go test ./... -coverprofile coverage.out + + build: + name: Build + runs-on: ubuntu-latest + needs: + - test + env: + CGO_ENABLED: 0 + TAG: ${{ github.ref_name }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.24.x + - name: Login to Docker Hub + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build + uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6 + with: + version: v0.155.0 + args: --debug + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Enable experimental docker features + run: | + mkdir -p ~/.docker/ && \ + echo '{"experimental": "enabled"}' > ~/.docker/config.json + - name: Create manifest for version + run: | + export DH_TAG=$(git tag --points-at HEAD | sed 's/^v*//') + docker manifest create \ + beatkind/watchtower:$DH_TAG \ + beatkind/watchtower:amd64-$DH_TAG \ + beatkind/watchtower:i386-$DH_TAG \ + beatkind/watchtower:armhf-$DH_TAG \ + beatkind/watchtower:arm64v8-$DH_TAG + - name: Create manifest for latest + run: | + docker manifest create \ + beatkind/watchtower:latest \ + beatkind/watchtower:amd64-latest \ + beatkind/watchtower:i386-latest \ + beatkind/watchtower:armhf-latest \ + beatkind/watchtower:arm64v8-latest + - name: Push manifests to Dockerhub + env: + DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + run: | + docker login -u $DOCKER_USER -p $DOCKER_TOKEN && \ + docker manifest push beatkind/watchtower:$(echo $TAG | sed 's/^v*//') && \ + docker manifest push beatkind/watchtower:latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 370d395..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,197 +0,0 @@ -name: Release (Production) - -on: - workflow_dispatch: {} - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - - '**/v[0-9]+.[0-9]+.[0-9]+' - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.20.x - - uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc #v1.3.0 - with: - version: "2022.1.1" - install-go: "false" # StaticCheck uses go v1.17 which does not support `any` - - test: - name: Test - strategy: - matrix: - go-version: - - 1.20.x - platform: - - ubuntu-latest - - macos-latest - - windows-latest - runs-on: ${{ matrix.platform }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.20.x - - name: Run tests - run: | - go test ./... -coverprofile coverage.out - - build: - name: Build - runs-on: ubuntu-latest - needs: - - test - - lint - env: - CGO_ENABLED: 0 - TAG: ${{ github.ref_name }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.20.x - - name: Login to Docker Hub - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc #v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GHCR - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc #v2 - with: - username: ${{ secrets.BOT_USERNAME }} - password: ${{ secrets.BOT_GHCR_PAT }} - registry: ghcr.io - - name: Build - uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v3 - with: - version: v0.155.0 - args: --debug - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Enable experimental docker features - run: | - mkdir -p ~/.docker/ && \ - echo '{"experimental": "enabled"}' > ~/.docker/config.json - - name: Create manifest for version - run: | - export DH_TAG=$(git tag --points-at HEAD | sed 's/^v*//') - docker manifest create \ - containrrr/watchtower:$DH_TAG \ - containrrr/watchtower:amd64-$DH_TAG \ - containrrr/watchtower:i386-$DH_TAG \ - containrrr/watchtower:armhf-$DH_TAG \ - containrrr/watchtower:arm64v8-$DH_TAG - docker manifest create \ - ghcr.io/containrrr/watchtower:$DH_TAG \ - ghcr.io/containrrr/watchtower:amd64-$DH_TAG \ - ghcr.io/containrrr/watchtower:i386-$DH_TAG \ - ghcr.io/containrrr/watchtower:armhf-$DH_TAG \ - ghcr.io/containrrr/watchtower:arm64v8-$DH_TAG - - name: Annotate manifest for version - run: | - for REPO in '' ghcr.io/ ; do - - docker manifest annotate \ - ${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \ - ${REPO}containrrr/watchtower:i386-$(echo $TAG | sed 's/^v*//') \ - --os linux \ - --arch 386 - - docker manifest annotate \ - ${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \ - ${REPO}containrrr/watchtower:armhf-$(echo $TAG | sed 's/^v*//') \ - --os linux \ - --arch arm - - docker manifest annotate \ - ${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \ - ${REPO}containrrr/watchtower:arm64v8-$(echo $TAG | sed 's/^v*//') \ - --os linux \ - --arch arm64 \ - --variant v8 - - done - - name: Create manifest for latest - run: | - docker manifest create \ - containrrr/watchtower:latest \ - containrrr/watchtower:amd64-latest \ - containrrr/watchtower:i386-latest \ - containrrr/watchtower:armhf-latest \ - containrrr/watchtower:arm64v8-latest - docker manifest create \ - ghcr.io/containrrr/watchtower:latest \ - ghcr.io/containrrr/watchtower:amd64-latest \ - ghcr.io/containrrr/watchtower:i386-latest \ - ghcr.io/containrrr/watchtower:armhf-latest \ - ghcr.io/containrrr/watchtower:arm64v8-latest - - name: Annotate manifest for latest - run: | - for REPO in '' ghcr.io/ ; do - - docker manifest annotate \ - ${REPO}containrrr/watchtower:latest \ - ${REPO}containrrr/watchtower:i386-latest \ - --os linux \ - --arch 386 - - docker manifest annotate \ - ${REPO}containrrr/watchtower:latest \ - ${REPO}containrrr/watchtower:armhf-latest \ - --os linux \ - --arch arm - - docker manifest annotate \ - ${REPO}containrrr/watchtower:latest \ - ${REPO}containrrr/watchtower:arm64v8-latest \ - --os linux \ - --arch arm64 \ - --variant v8 - - done - - name: Push manifests to Dockerhub - env: - DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - run: | - docker login -u $DOCKER_USER -p $DOCKER_TOKEN && \ - docker manifest push containrrr/watchtower:$(echo $TAG | sed 's/^v*//') && \ - docker manifest push containrrr/watchtower:latest - - name: Push manifests to GitHub Container Registry - env: - DOCKER_USER: ${{ secrets.BOT_USERNAME }} - DOCKER_TOKEN: ${{ secrets.BOT_GHCR_PAT }} - run: | - docker login -u $DOCKER_USER -p $DOCKER_TOKEN ghcr.io && \ - docker manifest push ghcr.io/containrrr/watchtower:$(echo $TAG | sed 's/^v*//') && \ - docker manifest push ghcr.io/containrrr/watchtower:latest - - renew-docs: - name: Refresh pkg.go.dev - needs: build - runs-on: ubuntu-latest - steps: - - name: Pull new module version - uses: andrewslotin/go-proxy-pull-action@50fea06a976087614babb9508e5c528b464f4645 #master@2022-10-14 - - - - - diff --git a/.gitignore b/.gitignore index 9519257..3609e99 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,8 @@ coverage.out *.coverprofile docs/assets/wasm_exec.js -docs/assets/*.wasm \ No newline at end of file +docs/assets/*.wasm +.vscode/settings.json + +.env +.venv diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..e7de50f --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +watchtower.devcdn.net \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0202384..bb49839 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,25 +1,33 @@ +# Contributing + ## Prerequisites + To contribute code changes to this project you will need the following development kits. - * [Go](https://golang.org/doc/install) - * [Docker](https://docs.docker.com/engine/installation/) - + +* [Go](https://golang.org/doc/install) +* [Docker](https://docs.docker.com/engine/installation/) + As watchtower utilizes go modules for vendor locking, you'll need at least Go 1.11. You can check your current version of the go language as follows: + ```bash ~ $ go version - go version go1.12.1 darwin/amd64 + go version go1.24.x darwin/amd64 ``` - ## Checking out the code + Do not place your code in the go source path. + ```bash git clone git@github.com:/watchtower.git cd watchtower ``` ## Building and testing + watchtower is a go application and is built with go commands. The following commands assume that you are at the root level of your repo. + ```bash go build # compiles and packages an executable binary, watchtower go test ./... -v # runs tests with verbose output @@ -29,10 +37,12 @@ go test ./... -v # runs tests with verbose output If you dont have it enabled, you'll either have to prefix each command with `GO111MODULE=on` or run `export GO111MODULE=on` before running the commands. [You can read more about modules here.](https://github.com/golang/go/wiki/Modules) To build a Watchtower image of your own, use the self-contained Dockerfiles. As the main Dockerfile, they can be found in `dockerfiles/`: -- `dockerfiles/Dockerfile.dev-self-contained` will build an image based on your current local Watchtower files. -- `dockerfiles/Dockerfile.self-contained` will build an image based on current Watchtower's repository on GitHub. + +* `dockerfiles/Dockerfile.dev-self-contained` will build an image based on your current local Watchtower files. +* `dockerfiles/Dockerfile.self-contained` will build an image based on current Watchtower's repository on GitHub. e.g.: + ```bash -sudo docker build . -f dockerfiles/Dockerfile.dev-self-contained -t containrrr/watchtower # to build an image from local files -``` \ No newline at end of file +sudo docker build . -f dockerfiles/Dockerfile.dev-self-contained -t beatkind/watchtower # to build an image from local files +``` diff --git a/README.md b/README.md index f550302..f0c0c53 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,25 @@ +# Watchtower + +> [!NOTE] +> This is a fork of the really nice project from [containrrr](https://github.com/containrrr) called [watchtower](https://github.com/containrrr/watchtower). +> +> I am not the original author of this project. I just forked it to make some changes to it and keep it up-to-date as properly as I can. +> +> Contributions, tips and hints are welcome. Just open an issue or a pull request. Please be aware that I am by no means a professional developer. I am just a Platform Engineer. +
- + - # Watchtower +A process for automating Docker container base image updates. + +

- A process for automating Docker container base image updates. -

- - [![Circle CI](https://circleci.com/gh/containrrr/watchtower.svg?style=shield)](https://circleci.com/gh/containrrr/watchtower) - [![codecov](https://codecov.io/gh/containrrr/watchtower/branch/main/graph/badge.svg)](https://codecov.io/gh/containrrr/watchtower) - [![GoDoc](https://godoc.org/github.com/containrrr/watchtower?status.svg)](https://godoc.org/github.com/containrrr/watchtower) - [![Go Report Card](https://goreportcard.com/badge/github.com/containrrr/watchtower)](https://goreportcard.com/report/github.com/containrrr/watchtower) - [![latest version](https://img.shields.io/github/tag/containrrr/watchtower.svg)](https://github.com/containrrr/watchtower/releases) - [![Apache-2.0 License](https://img.shields.io/github/license/containrrr/watchtower.svg)](https://www.apache.org/licenses/LICENSE-2.0) - [![Codacy Badge](https://app.codacy.com/project/badge/Grade/1c48cfb7646d4009aa8c6f71287670b8)](https://www.codacy.com/gh/containrrr/watchtower/dashboard?utm_source=github.com&utm_medium=referral&utm_content=containrrr/watchtower&utm_campaign=Badge_Grade) - [![All Contributors](https://img.shields.io/github/all-contributors/containrrr/watchtower)](#contributors) - [![Pulls from DockerHub](https://img.shields.io/docker/pulls/containrrr/watchtower.svg)](https://hub.docker.com/r/containrrr/watchtower) +[![codecov](https://codecov.io/gh/beatkind/watchtower/branch/main/graph/badge.svg)](https://codecov.io/gh/beatkind/watchtower) +[![GoDoc](https://godoc.org/github.com/beatkind/watchtower?status.svg)](https://godoc.org/github.com/beatkind/watchtower) +[![Go Report Card](https://goreportcard.com/badge/github.com/beatkind/watchtower)](https://goreportcard.com/report/github.com/beatkind/watchtower) +[![latest version](https://img.shields.io/github/tag/beatkind/watchtower.svg)](https://github.com/beatkind/watchtower/releases) +[![Apache-2.0 License](https://img.shields.io/github/license/beatkind/watchtower.svg)](https://www.apache.org/licenses/LICENSE-2.0) +[![Pulls from DockerHub](https://img.shields.io/docker/pulls/beatkind/watchtower.svg)](https://hub.docker.com/r/beatkind/watchtower)
@@ -24,155 +29,15 @@ With watchtower you can update the running version of your containerized app sim Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially. Run the watchtower container with the following command: -``` +```bash $ docker run --detach \ --name watchtower \ --volume /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower + beatkind/watchtower ``` -Watchtower is intended to be used in homelabs, media centers, local dev environments, and similar. We do **not** recommend using Watchtower in a commercial or production environment. If that is you, you should be looking into using Kubernetes. If that feels like too big a step for you, please look into solutions like [MicroK8s](https://microk8s.io/) and [k3s](https://k3s.io/) that take away a lot of the toil of running a Kubernetes cluster. +Watchtower is intended to be used in homelabs, media centers, local dev environments, and similar. We do **not** recommend using Watchtower in a commercial or production environment. If that is you, you should be looking into using Kubernetes. If that feels like too big a step for you, please look into solutions like [MicroK8s](https://microk8s.io/) and [k3s](https://k3s.io/) that take away a lot of the toil of running a Kubernetes cluster. ## Documentation -The full documentation is available at https://containrrr.dev/watchtower. -## Contributors - -Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nils måsén
nils måsén

💻 📖 🚧 👀
Simon Aronsson
Simon Aronsson

💻 📖 🚧 👀
James
James

⚠️ 🤔
Florian
Florian

👀 📖
Brian DeHamer
Brian DeHamer

💻 🚧
Ross Cadogan
Ross Cadogan

💻
stffabi
stffabi

💻 🚧
Austin
Austin

📖
David Gardner
David Gardner

👀 📖
Tanguy ⧓ Herrmann
Tanguy ⧓ Herrmann

💻
Rodrigo Damazio Bovendorp
Rodrigo Damazio Bovendorp

💻 📖
Ryan Kuba
Ryan Kuba

🚇
cnrmck
cnrmck

📖
Harry Walter
Harry Walter

💻
Robotex
Robotex

📖
Gerald Pape
Gerald Pape

📖
fomk
fomk

💻
Sven Gottwald
Sven Gottwald

🚇
techknowlogick
techknowlogick

💻
waja
waja

📖
Scott Albertson
Scott Albertson

📖
Jason Huddleston
Jason Huddleston

📖
Napster
Napster

💻
Maxim
Maxim

💻 📖
Max Schmitt
Max Schmitt

📖
cron410
cron410

📖
Paulo Henrique
Paulo Henrique

📖
Kaleb Elwert
Kaleb Elwert

📖
Bill Butler
Bill Butler

📖
Mario Tacke
Mario Tacke

💻
Mark Woodbridge
Mark Woodbridge

💻
Ansem93
Ansem93

📖
Luka Peschke
Luka Peschke

💻 📖
Zois Pagoulatos
Zois Pagoulatos

💻 👀 🚧
Alexandre Menif
Alexandre Menif

💻
Andrey
Andrey

📖
Armando Lüscher
Armando Lüscher

📖
Ryan Budke
Ryan Budke

📖
Kaloyan Raev
Kaloyan Raev

💻 ⚠️
sixth
sixth

📖
Gina Häußge
Gina Häußge

💻
Max H.
Max H.

💻
Jungkook Park
Jungkook Park

📖
Jan Kristof Nidzwetzki
Jan Kristof Nidzwetzki

📖
lukas
lukas

💻
Ameya Shenoy
Ameya Shenoy

💻
Raymon de Looff
Raymon de Looff

💻
John Clayton
John Clayton

💻
Germs2004
Germs2004

📖
Lukas Willburger
Lukas Willburger

💻
Oliver Cervera
Oliver Cervera

📖
Victor Moura
Victor Moura

⚠️ 💻 📖
Maximilian Brandau
Maximilian Brandau

💻 ⚠️
Andrew
Andrew

📖
sixcorners
sixcorners

📖
Arne Jørgensen
Arne Jørgensen

⚠️ 👀
PatSki123
PatSki123

📖
Valentine Zavadsky
Valentine Zavadsky

💻 📖 ⚠️
Alexander Voronin
Alexander Voronin

💻 🐛
Oliver Mueller
Oliver Mueller

📖
Sebastiaan Tammer
Sebastiaan Tammer

💻
miosame
miosame

📖
Andrew Metzger
Andrew Metzger

🐛 💡
Pierre Grimaud
Pierre Grimaud

📖
Matt Doran
Matt Doran

📖
MihailITPlace
MihailITPlace

💻
bugficks
bugficks

💻 📖
Michael
Michael

💻
D. Domig
D. Domig

📖
Ben Osheroff
Ben Osheroff

💻
David H.
David H.

💻
Chander Ganesan
Chander Ganesan

📖
yrien30
yrien30

💻
ksurl
ksurl

📖 💻 🚇
rg9400
rg9400

💻
Turtle Kalus
Turtle Kalus

💻
Srihari Thalla
Srihari Thalla

📖
Thomas Gaudin
Thomas Gaudin

📖
hydrargyrum
hydrargyrum

📖
Reinout van Rees
Reinout van Rees

📖
DasSkelett
DasSkelett

💻
zenjabba
zenjabba

📖
Dan Quan
Dan Quan

📖
modem7
modem7

📖
Igor Zibarev
Igor Zibarev

💻
Patrice
Patrice

💻
James White
James White

📖
Dirk Kok
Dirk Kok

💻
EDIflyer
EDIflyer

📖
Jauder Ho
Jauder Ho

💻
Tamal Das
Tamal Das

📖
guangwu
guangwu

📖
Florian Hübner
Florian Hübner

📖 💻

Andrii Bratanin

📖
- - - - - - -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! +The full documentation is available at . diff --git a/SECURITY.md b/SECURITY.md index 550f904..34679e1 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,13 +1,3 @@ # Security Policy -## Supported Versions - -Security updates will always only be applied to the latest version of Watchtower. -As the software by default is set to auto-update if you use the `latest` tag, you will get these security updates automatically as soon as they are released. - -## Reporting a Vulnerability - -Critical vulnerabilities that might open up for external attacks are best reported directly either to simme@arcticbit.se or nils@piksel.se. -We'll always try to get back to you as swiftly as possible, but keep in mind that since this is a community project, we can't really leave any guarantees about the speed. - -Non-critical vulnerabilities may be reported as regular GitHub issues. +Nothing here yet. We'll figure it out. Message me if you need something under: . diff --git a/build.sh b/build.sh index 78b1bfc..25201d6 100755 --- a/build.sh +++ b/build.sh @@ -6,4 +6,4 @@ if [ -n "$MSYSTEM" ]; then fi VERSION=$(git describe --tags) echo "Building $VERSION..." -go build -o $BINFILE -ldflags "-X github.com/containrrr/watchtower/internal/meta.Version=$VERSION" +go build -o $BINFILE -ldflags "-X github.com/beatkind/watchtower/internal/meta.Version=$VERSION" diff --git a/cmd/notify-upgrade.go b/cmd/notify-upgrade.go index 9991ee6..14625a5 100644 --- a/cmd/notify-upgrade.go +++ b/cmd/notify-upgrade.go @@ -9,9 +9,9 @@ import ( "syscall" "time" - "github.com/containrrr/watchtower/internal/flags" - "github.com/containrrr/watchtower/pkg/container" - "github.com/containrrr/watchtower/pkg/notifications" + "github.com/beatkind/watchtower/internal/flags" + "github.com/beatkind/watchtower/pkg/container" + "github.com/beatkind/watchtower/pkg/notifications" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cmd/root.go index eef13ce..8ce538f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -11,17 +11,17 @@ import ( "syscall" "time" - "github.com/containrrr/watchtower/internal/actions" - "github.com/containrrr/watchtower/internal/flags" - "github.com/containrrr/watchtower/internal/meta" - "github.com/containrrr/watchtower/pkg/api" - apiMetrics "github.com/containrrr/watchtower/pkg/api/metrics" - "github.com/containrrr/watchtower/pkg/api/update" - "github.com/containrrr/watchtower/pkg/container" - "github.com/containrrr/watchtower/pkg/filters" - "github.com/containrrr/watchtower/pkg/metrics" - "github.com/containrrr/watchtower/pkg/notifications" - t "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/internal/actions" + "github.com/beatkind/watchtower/internal/flags" + "github.com/beatkind/watchtower/internal/meta" + "github.com/beatkind/watchtower/pkg/api" + apiMetrics "github.com/beatkind/watchtower/pkg/api/metrics" + "github.com/beatkind/watchtower/pkg/api/update" + "github.com/beatkind/watchtower/pkg/container" + "github.com/beatkind/watchtower/pkg/filters" + "github.com/beatkind/watchtower/pkg/metrics" + "github.com/beatkind/watchtower/pkg/notifications" + t "github.com/beatkind/watchtower/pkg/types" "github.com/robfig/cron" log "github.com/sirupsen/logrus" @@ -54,7 +54,7 @@ func NewRootCommand() *cobra.Command { Short: "Automatically updates running Docker containers", Long: ` Watchtower automatically updates running Docker containers whenever a new image is released. - More information available at https://github.com/containrrr/watchtower/. + More information available at https://github.com/beatkind/watchtower/. `, Run: Run, PreRun: PreRun, @@ -117,17 +117,19 @@ func PreRun(cmd *cobra.Command, _ []string) { reviveStopped, _ := f.GetBool("revive-stopped") removeVolumes, _ := f.GetBool("remove-volumes") warnOnHeadPullFailed, _ := f.GetString("warn-on-head-failure") + disableMemorySwappiness, _ := f.GetBool("disable-memory-swappiness") if monitorOnly && noPull { log.Warn("Using `WATCHTOWER_NO_PULL` and `WATCHTOWER_MONITOR_ONLY` simultaneously might lead to no action being taken at all. If this is intentional, you may safely ignore this message.") } client = container.NewClient(container.ClientOptions{ - IncludeStopped: includeStopped, - ReviveStopped: reviveStopped, - RemoveVolumes: removeVolumes, - IncludeRestarting: includeRestarting, - WarnOnHeadFailed: container.WarningStrategy(warnOnHeadPullFailed), + IncludeStopped: includeStopped, + ReviveStopped: reviveStopped, + RemoveVolumes: removeVolumes, + IncludeRestarting: includeRestarting, + DisableMemorySwappiness: disableMemorySwappiness, + WarnOnHeadFailed: container.WarningStrategy(warnOnHeadPullFailed), }) notifier = notifications.NewNotifier(cmd) diff --git a/code_of_conduct.md b/code_of_conduct.md index 65d4355..f871c31 100644 --- a/code_of_conduct.md +++ b/code_of_conduct.md @@ -1,3 +1,3 @@ -### Containrrr Community Code of Conduct +# Containrrr Community Code of Conduct -Please refer to out [Containrrr Community Code of Conduct](https://github.com/containrrr/.github/blob/master/CODE_OF_CONDUCT.md) +Nothing here yet. We'll figure it our, once it is at that point. diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 2fc571d..6d4a3ee 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM alpine:3.19.0 as alpine +FROM --platform=$BUILDPLATFORM alpine:3.22.0 as alpine RUN apk add --no-cache \ ca-certificates \ diff --git a/dockerfiles/Dockerfile.dev-self-contained b/dockerfiles/Dockerfile.dev-self-contained index 1a39c26..08433c0 100644 --- a/dockerfiles/Dockerfile.dev-self-contained +++ b/dockerfiles/Dockerfile.dev-self-contained @@ -25,7 +25,7 @@ COPY . /watchtower RUN \ cd /watchtower && \ \ - GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -X github.com/containrrr/watchtower/internal/meta.Version=$(git describe --tags)" . && \ + GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -X github.com/beatkind/watchtower/internal/meta.Version=$(git describe --tags)" . && \ GO111MODULE=on go test ./... -v diff --git a/dockerfiles/Dockerfile.self-contained b/dockerfiles/Dockerfile.self-contained index 04a6047..ed62341 100644 --- a/dockerfiles/Dockerfile.self-contained +++ b/dockerfiles/Dockerfile.self-contained @@ -13,12 +13,12 @@ RUN apk add --no-cache \ git \ tzdata -RUN git clone --branch "${WATCHTOWER_VERSION}" https://github.com/containrrr/watchtower.git +RUN git clone --branch "${WATCHTOWER_VERSION}" https://github.com/beatkind/watchtower.git RUN \ cd watchtower && \ \ - GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -X github.com/containrrr/watchtower/internal/meta.Version=$(git describe --tags)" . && \ + GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -X github.com/beatkind/watchtower/internal/meta.Version=$(git describe --tags)" . && \ GO111MODULE=on go test ./... -v diff --git a/dockerfiles/container-networking/docker-compose.yml b/dockerfiles/container-networking/docker-compose.yml index 24cd00d..3bdc21a 100644 --- a/dockerfiles/container-networking/docker-compose.yml +++ b/dockerfiles/container-networking/docker-compose.yml @@ -1,6 +1,6 @@ services: producer: - image: qmcgaw/gluetun:v3.35.0 + image: qmcgaw/gluetun:v3.40.0 cap_add: - NET_ADMIN environment: @@ -11,7 +11,7 @@ services: consumer: depends_on: - producer - image: nginx:1.25.1 + image: nginx:1.28.0 network_mode: "service:producer" labels: - "com.centurylinklabs.watchtower.depends-on=/wt-contnet-producer-1" diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..e7de50f --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +watchtower.devcdn.net \ No newline at end of file diff --git a/docs/arguments.md b/docs/arguments.md index d7ed0b0..4a2ef93 100644 --- a/docs/arguments.md +++ b/docs/arguments.md @@ -1,3 +1,5 @@ +# Arguments + By default, watchtower will monitor all containers running within the Docker daemon to which it is pointed (in most cases this will be the local Docker daemon, but you can override it with the `--host` option described in the next section). However, you can restrict watchtower to monitoring a subset of the running containers by specifying the container names as arguments when @@ -7,7 +9,7 @@ launching watchtower. $ docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower \ + beatkind/watchtower \ nginx redis ``` @@ -18,7 +20,7 @@ the watchtower container after its execution. ```bash $ docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower \ + beatkind/watchtower \ --run-once \ nginx redis ``` @@ -33,14 +35,16 @@ Some arguments can also reference a file, in which case the contents of the file This can be used to avoid putting secrets in the configuration file or command line. The following arguments are currently supported (including their corresponding `WATCHTOWER_` environment variables): - - `notification-url` - - `notification-email-server-password` - - `notification-slack-hook-url` - - `notification-msteams-hook` - - `notification-gotify-token` - - `http-api-token` + +- `notification-url` +- `notification-email-server-password` +- `notification-slack-hook-url` +- `notification-msteams-hook` +- `notification-gotify-token` +- `http-api-token` ### Example docker-compose usage + ```yaml secrets: access_token: @@ -55,6 +59,7 @@ services: ``` ## Help + Shows documentation about the supported flags. ```text @@ -65,6 +70,7 @@ Environment Variable: N/A ``` ## Time Zone + Sets the time zone to be used by WatchTower's logs and the optional Cron scheduling argument (--schedule). If this environment variable is not set, Watchtower will use the default time zone: UTC. To find out the right value, see [this list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), find your location and use the value in _TZ Database Name_, e.g _Europe/Rome_. The timezone can alternatively be set by volume mounting your hosts /etc/localtime file. `-v /etc/localtime:/etc/localtime:ro` @@ -76,6 +82,7 @@ Environment Variable: TZ ``` ## Cleanup + Removes old images after updating. When this flag is specified, watchtower will remove the old image after restarting a container with a new image. Use this option to prevent the accumulation of orphaned images on your system as containers are updated. ```text @@ -86,6 +93,7 @@ Environment Variable: WATCHTOWER_CLEANUP ``` ## Remove anonymous volumes + Removes anonymous volumes after updating. When this flag is specified, watchtower will remove all anonymous volumes from the container before restarting with a new image. Named volumes will not be removed! ```text @@ -96,10 +104,11 @@ Environment Variable: WATCHTOWER_REMOVE_VOLUMES ``` ## Debug + Enable debug mode with verbose logging. -!!! note "Notes" - Alias for `--log-level debug`. See [Maximum log level](#maximum-log-level). +!!! note "Notes" + Alias for `--log-level debug`. See [Maximum log level](#maximum-log-level). Does _not_ take an argument when used as an argument. Using `--debug true` will **not** work. ```text @@ -110,10 +119,11 @@ Environment Variable: WATCHTOWER_DEBUG ``` ## Trace + Enable trace mode with very verbose logging. Caution: exposes credentials! -!!! note "Notes" - Alias for `--log-level trace`. See [Maximum log level](#maximum-log-level). +!!! note "Notes" + Alias for `--log-level trace`. See [Maximum log level](#maximum-log-level). Does _not_ take an argument when used as an argument. Using `--trace true` will **not** work. ```text @@ -146,6 +156,7 @@ Environment Variable: WATCHTOWER_LOG_FORMAT ``` ## ANSI colors + Disable ANSI color escape codes in log output. ```text @@ -156,6 +167,7 @@ Environment Variable: NO_COLOR ``` ## Docker host + Docker daemon socket to connect to. Can be pointed at a remote Docker host by specifying a TCP endpoint as "tcp://hostname:port". ```text @@ -166,16 +178,18 @@ Environment Variable: DOCKER_HOST ``` ## Docker API version -The API version to use by the Docker client for connecting to the Docker daemon. The minimum supported version is 1.24. + +The API version to use by the Docker client for connecting to the Docker daemon. The minimum supported version is 1.44. ```text Argument: --api-version, -a Environment Variable: DOCKER_API_VERSION Type: String - Default: "1.24" + Default: "1.44" ``` ## Include restarting + Will also include restarting containers. ```text @@ -186,6 +200,7 @@ Environment Variable: WATCHTOWER_INCLUDE_RESTARTING ``` ## Include stopped + Will also include created and exited containers. ```text @@ -196,6 +211,7 @@ Environment Variable: WATCHTOWER_INCLUDE_STOPPED ``` ## Revive stopped + Start any stopped containers that have had their image updated. This argument is only usable with the `--include-stopped` argument. ```text @@ -206,6 +222,7 @@ Environment Variable: WATCHTOWER_REVIVE_STOPPED ``` ## Poll interval + Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. Either `--schedule` or a poll interval can be defined, but not both. ```text @@ -216,6 +233,7 @@ Environment Variable: WATCHTOWER_POLL_INTERVAL ``` ## Filter by enable label + Monitor and update containers that have a `com.centurylinklabs.watchtower.enable` label set to true. ```text @@ -226,11 +244,13 @@ Environment Variable: WATCHTOWER_LABEL_ENABLE ``` ## Filter by disable label -__Do not__ Monitor and update containers that have `com.centurylinklabs.watchtower.enable` label set to false and -no `--label-enable` argument is passed. Note that only one or the other (targeting by enable label) can be + +__Do not__ Monitor and update containers that have `com.centurylinklabs.watchtower.enable` label set to false and +no `--label-enable` argument is passed. Note that only one or the other (targeting by enable label) can be used at the same time to target containers. ## Filter by disabling specific container names + Monitor and update containers whose names are not in a given set of names. This can be used to exclude specific containers, when setting labels is not an option. @@ -244,8 +264,9 @@ Environment Variable: WATCHTOWER_DISABLE_CONTAINERS ``` ## Without updating containers + Will only monitor for new images, send notifications and invoke -the [pre-check/post-check hooks](https://containrrr.dev/watchtower/lifecycle-hooks/), but will __not__ update the +the [pre-check/post-check hooks](https://watchtower.devcdn.net/lifecycle-hooks/), but will __not__ update the containers. !!! note @@ -276,8 +297,10 @@ Environment Variable: WATCHTOWER_LABEL_TAKE_PRECEDENCE ``` ## Without restarting containers + Do not restart containers after updating. This option can be useful when the start of the containers is managed by an external system such as systemd. + ```text Argument: --no-restart Environment Variable: WATCHTOWER_NO_RESTART @@ -286,6 +309,7 @@ Environment Variable: WATCHTOWER_NO_RESTART ``` ## Without pulling new images + Do not pull new images. When this flag is specified, watchtower will not attempt to pull new images from the registry. Instead it will only monitor the local image cache for changes. Use this option if you are building new images directly on the Docker host without pushing @@ -304,6 +328,7 @@ Note that no-pull can also be specified on a per-container basis with the See [With label taking precedence over arguments](#With-label-taking-precedence-over-arguments) for behavior when both argument and label are set ## Without sending a startup message + Do not send a message after watchtower started. Otherwise there will be an info-level notification. ```text @@ -324,8 +349,9 @@ Environment Variable: WATCHTOWER_RUN_ONCE ``` ## HTTP API Mode -Runs Watchtower in HTTP API mode, only allowing image updates to be triggered by an HTTP request. -For details see [HTTP API](https://containrrr.dev/watchtower/http-api-mode). + +Runs Watchtower in HTTP API mode, only allowing image updates to be triggered by an HTTP request. +For details see [HTTP API](https://watchtower.devcdn.net/http-api-mode). ```text Argument: --http-api-update @@ -335,6 +361,7 @@ Environment Variable: WATCHTOWER_HTTP_API_UPDATE ``` ## HTTP API Token + Sets an authentication token to HTTP API requests. Can also reference a file, in which case the contents of the file are used. @@ -346,7 +373,8 @@ Environment Variable: WATCHTOWER_HTTP_API_TOKEN ``` ## HTTP API periodic polls -Keep running periodic updates if the HTTP API mode is enabled, otherwise the HTTP API would prevent periodic polls. + +Keep running periodic updates if the HTTP API mode is enabled, otherwise the HTTP API would prevent periodic polls. ```text Argument: --http-api-periodic-polls @@ -356,8 +384,9 @@ Environment Variable: WATCHTOWER_HTTP_API_PERIODIC_POLLS ``` ## Filter by scope -Update containers that have a `com.centurylinklabs.watchtower.scope` label set with the same value as the given argument. -This enables [running multiple instances](https://containrrr.dev/watchtower/running-multiple-instances). + +Update containers that have a `com.centurylinklabs.watchtower.scope` label set with the same value as the given argument. +This enables [running multiple instances](https://watchtower.devcdn.net/running-multiple-instances). !!! note "Filter by lack of scope" If you want other instances of watchtower to ignore the scoped containers, set this argument to `none`. @@ -369,10 +398,11 @@ This enables [running multiple instances](https://containrrr.dev/watchtower/runn Environment Variable: WATCHTOWER_SCOPE Type: String Default: - -``` +``` ## HTTP API Metrics -Enables a metrics endpoint, exposing prometheus metrics via HTTP. See [Metrics](metrics.md) for details. + +Enables a metrics endpoint, exposing prometheus metrics via HTTP. See [Metrics](metrics.md) for details. ```text Argument: --http-api-metrics @@ -382,6 +412,7 @@ Environment Variable: WATCHTOWER_HTTP_API_METRICS ``` ## Scheduling + [Cron expression](https://pkg.go.dev/github.com/robfig/cron@v1.2.0?tab=doc#hdr-CRON_Expression_Format) in 6 fields (rather than the traditional 5) which defines when and how often to check for new images. Either `--interval` or the schedule expression can be defined, but not both. An example: `--schedule "0 0 4 * * *"` @@ -393,6 +424,7 @@ Environment Variable: WATCHTOWER_SCHEDULE ``` ## Rolling restart + Restart one image at time instead of stopping and starting all at once. Useful in conjunction with lifecycle hooks to implement zero-downtime deploy. @@ -404,6 +436,7 @@ Environment Variable: WATCHTOWER_ROLLING_RESTART ``` ## Wait until timeout + Timeout before the container is forcefully stopped. When set, this option will change the default (`10s`) wait time to the given value. An example: `--stop-timeout 30s` will set the timeout to 30 seconds. ```text @@ -450,18 +483,30 @@ Returns a success exit code to enable usage with docker `HEALTHCHECK`. This chec ## Programatic Output (porcelain) -Writes the session results to STDOUT using a stable, machine-readable format (indicated by the argument VERSION). - +Writes the session results to STDOUT using a stable, machine-readable format (indicated by the argument VERSION). + Alias for: ```text - --notification-url logger:// - --notification-log-stdout - --notification-report - --notification-template porcelain.VERSION.summary-no-log +--notification-url logger:// +--notification-log-stdout +--notification-report +--notification-template porcelain.VERSION.summary-no-log Argument: --porcelain, -P Environment Variable: WATCHTOWER_PORCELAIN Possible values: v1 Default: - ``` + +## Compatibility with podman (Disable memory swappiness) + +Disable memory swappiness. By default, podman sets the memory-swappiness value to 0 when no memory-swappiness is defined +When this flag is specified, watchtower will set the memory-swappiness to nil, fixing a compatibility issue with podman running with crun and cgroupv2 + +```text + Argument: --disable-memory-swappiness +Environment Variable: WATCHTOWER_DISABLE_MEMORY_SWAPPINESS + Type: Boolean + Default: false +``` diff --git a/docs/container-selection.md b/docs/container-selection.md index 8327c66..2465443 100644 --- a/docs/container-selection.md +++ b/docs/container-selection.md @@ -1,11 +1,13 @@ +# Container Selection + By default, watchtower will watch all containers. However, sometimes only some containers should be updated. There are two options: -- **Fully exclude**: You can choose to exclude containers entirely from being watched by watchtower. -- **Monitor only**: In this mode, watchtower checks for container updates, sends notifications and invokes the [pre-check/post-check hooks](https://containrrr.dev/watchtower/lifecycle-hooks/) on the containers but does **not** perform the update. +- **Fully exclude**: You can choose to exclude containers entirely from being watched by watchtower. +- **Monitor only**: In this mode, watchtower checks for container updates, sends notifications and invokes the [pre-check/post-check hooks](https://watchtower.devcdn.net/lifecycle-hooks/) on the containers but does **not** perform the update. -## Full Exclude +## Full Exclude If you need to exclude some containers, set the _com.centurylinklabs.watchtower.enable_ label to `false`. For clarity this should be set **on the container(s)** you wish to be ignored, this is not set on watchtower. @@ -23,7 +25,6 @@ If you need to exclude some containers, set the _com.centurylinklabs.watchtower. === "docker-compose" ``` yaml - version: "3" services: someimage: container_name: someimage @@ -31,7 +32,7 @@ If you need to exclude some containers, set the _com.centurylinklabs.watchtower. - "com.centurylinklabs.watchtower.enable=false" ``` -If instead you want to [only include containers with the enable label](https://containrrr.github.io/watchtower/arguments/#filter_by_enable_label), pass the `--label-enable` flag or the `WATCHTOWER_LABEL_ENABLE` environment variable on startup for watchtower and set the _com.centurylinklabs.watchtower.enable_ label with a value of `true` on the containers you want to watch. +If instead you want to [only include containers with the enable label](https://watchtower.devcdn.net/arguments/#filter_by_enable_label), pass the `--label-enable` flag or the `WATCHTOWER_LABEL_ENABLE` environment variable on startup for watchtower and set the _com.centurylinklabs.watchtower.enable_ label with a value of `true` on the containers you want to watch. === "dockerfile" @@ -47,7 +48,6 @@ If instead you want to [only include containers with the enable label](https://c === "docker-compose" ``` yaml - version: "3" services: someimage: container_name: someimage @@ -55,7 +55,7 @@ If instead you want to [only include containers with the enable label](https://c - "com.centurylinklabs.watchtower.enable=true" ``` -If you wish to create a monitoring scope, you will need to [run multiple instances and set a scope for each of them](https://containrrr.github.io/watchtower/running-multiple-instances). +If you wish to create a monitoring scope, you will need to [run multiple instances and set a scope for each of them](https://watchtower.devcdn.net/running-multiple-instances). Watchtower filters running containers by testing them against each configured criteria. A container is monitored if all criteria are met. For example: @@ -78,4 +78,4 @@ Or, it can be specified as part of the `docker run` command line: docker run -d --label=com.centurylinklabs.watchtower.monitor-only=true someimage ``` -When the label is specified on a container, watchtower treats that container exactly as if [`WATCHTOWER_MONITOR_ONLY`](https://containrrr.dev/watchtower/arguments/#without_updating_containers) was set, but the effect is limited to the individual container. +When the label is specified on a container, watchtower treats that container exactly as if [`WATCHTOWER_MONITOR_ONLY`](https://watchtower.devcdn.net/arguments/#without_updating_containers) was set, but the effect is limited to the individual container. diff --git a/docs/http-api-mode.md b/docs/http-api-mode.md index 69812bb..39fda1d 100644 --- a/docs/http-api-mode.md +++ b/docs/http-api-mode.md @@ -1,3 +1,5 @@ +# HTTP API Mode + Watchtower provides an HTTP API mode that enables an HTTP endpoint that can be requested to trigger container updating. The current available endpoint list is: - `/v1/update` - triggers an update for all of the containers monitored by this Watchtower instance. @@ -7,7 +9,7 @@ Watchtower provides an HTTP API mode that enables an HTTP endpoint that can be r To enable this mode, use the flag `--http-api-update`. For example, in a Docker Compose config file: ```yaml -version: '3' + services: app-monitored-by-watchtower: @@ -16,7 +18,7 @@ services: - "com.centurylinklabs.watchtower.enable=true" watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock command: --debug --http-api-update diff --git a/docs/index.md b/docs/index.md index 1d0b2cc..e7a8ee6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,35 +8,33 @@

A container-based solution for automating Docker container base image updates.

- - Circle CI + + Codecov - - Codecov + + GoDoc - - GoDoc + + Go Report Card - - Go Report Card - - - latest version + + latest version - Apache-2.0 License + Apache-2.0 License - - Codacy Badge - - - All Contributors - - - Pulls from DockerHub + + Pulls from DockerHub

+# Overview + +!!! note "Watchtower fork" + This is a fork of the really nice project from [containrrr](https://github.com/containrrr) called [watchtower](https://github.com/containrrr/watchtower). + I am not the original author of this project. I just forked it to make some changes to it and keep it up-to-date as properly as I can. + Contributions, tips and hints are welcome. Just open an issue or a pull request. Please be aware that I am by no means a professional developer. I am just a Platform Engineer. + ## Quick Start With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker @@ -50,16 +48,15 @@ the following command: $ docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower + beatkind/watchtower ``` === "docker-compose.yml" ```yaml - version: "3" services: watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock ``` diff --git a/docs/introduction.md b/docs/introduction.md index cbbc3a3..f2f131d 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,3 +1,5 @@ +# Introduction + Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image. With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially. @@ -8,8 +10,7 @@ For example, let's say you were running watchtower along with an instance of _ce $ docker ps CONTAINER ID IMAGE STATUS PORTS NAMES 967848166a45 centurylink/wetty-cli Up 10 minutes 0.0.0.0:8080->3000/tcp wetty -6cc4d2a9d1a5 containrrr/watchtower Up 15 minutes watchtower +6cc4d2a9d1a5 beatkind/watchtower Up 15 minutes watchtower ``` Every day watchtower will pull the latest _centurylink/wetty-cli_ image and compare it to the one that was used to run the "wetty" container. If it sees that the image has changed it will stop/remove the "wetty" container and then restart it using the new image and the same `docker run` options that were used to start the container initially (in this case, that would include the `-p 8080:3000` port mapping). - diff --git a/docs/lifecycle-hooks.md b/docs/lifecycle-hooks.md index 0c1e4e0..a7d3b11 100644 --- a/docs/lifecycle-hooks.md +++ b/docs/lifecycle-hooks.md @@ -1,10 +1,10 @@ -## Executing commands before and after updating +# Executing commands before and after updating -!!! note +!!! note These are shell commands executed with `sh`, and therefore require the container to provide the `sh` executable. -> **DO NOTE**: If the container is not running then lifecycle hooks can not run and therefore +> **DO NOTE**: If the container is not running then lifecycle hooks can not run and therefore > the update is executed without running any lifecycle hooks. It is possible to execute _pre/post\-check_ and _pre/post\-update_ commands @@ -19,14 +19,14 @@ This feature is disabled by default. To enable it, you need to set the option `--enable-lifecycle-hooks` on the command line, or set the environment variable `WATCHTOWER_LIFECYCLE_HOOKS` to `true`. -### Specifying update commands +## Specifying update commands The commands are specified using docker container labels, the following are currently available: | Type | Docker Container Label | -| ----------- | ------------------------------------------------------ | +| ----------- | ------------------------------------------------------ | | Pre Check | `com.centurylinklabs.watchtower.lifecycle.pre-check` | -| Pre Update | `com.centurylinklabs.watchtower.lifecycle.pre-update` | +| Pre Update | `com.centurylinklabs.watchtower.lifecycle.pre-update` | | Post Update | `com.centurylinklabs.watchtower.lifecycle.post-update` | | Post Check | `com.centurylinklabs.watchtower.lifecycle.post-check` | @@ -34,7 +34,7 @@ These labels can be declared as instructions in a Dockerfile (with some example the `docker run` command line: === "Dockerfile" - ```docker + ```docker LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh" LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh" LABEL com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh" @@ -42,7 +42,7 @@ the `docker run` command line: ``` === "docker run" - ```bash + ```bash docker run -d \ --label=com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh" \ --label=com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh" \ @@ -50,20 +50,21 @@ the `docker run` command line: someimage --label=com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh" \ ``` -### Timeouts +## Timeouts + The timeout for all lifecycle commands is 60 seconds. After that, a timeout will occur, forcing Watchtower to continue the update loop. -#### Pre- or Post-update timeouts +### Pre- or Post-update timeouts For the `pre-update` or `post-update` lifecycle command, it is possible to override this timeout to allow the script to finish before forcefully killing it. This is done by adding the label `com.centurylinklabs.watchtower.lifecycle.pre-update-timeout` or post-update-timeout respectively followed by the timeout expressed in minutes. -If the label value is explicitly set to `0`, the timeout will be disabled. +If the label value is explicitly set to `0`, the timeout will be disabled. -### Execution failure +## Execution failure The failure of a command to execute, identified by an exit code different than 0 or 75 (EX_TEMPFAIL), will not prevent watchtower from updating the container. Only an error diff --git a/docs/linked-containers.md b/docs/linked-containers.md index c7e9be8..b7e760c 100644 --- a/docs/linked-containers.md +++ b/docs/linked-containers.md @@ -1,3 +1,5 @@ +# Linked Containers + Watchtower will detect if there are links between any of the running containers and ensures that things are stopped/started in a way that won't break any of the links. If an update is detected for one of the dependencies in a group of linked containers, watchtower will stop and start all of the containers in the correct order so that the application comes back up correctly. For example, imagine you were running a _mysql_ container and a _wordpress_ container which had been linked to the _mysql_ container. If watchtower were to detect that the _mysql_ container required an update, it would first shut down the linked _wordpress_ container followed by the _mysql_ container. When restarting the containers it would handle _mysql_ first and then _wordpress_ to ensure that the link continued to work. diff --git a/docs/metrics.md b/docs/metrics.md index 480d7c6..237401b 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -1,3 +1,5 @@ +# Watchtower Metrics + !!! warning "Experimental feature" This feature was added in v1.0.4 and is still considered experimental. If you notice any strange behavior, please raise a ticket in the repository issues. @@ -9,7 +11,7 @@ as well as creating a port mapping for your container for port `8080`. The metrics API endpoint is `/v1/metrics`. -## Available Metrics +## Available Metrics | Name | Type | Description | | ------------------------------- | ------- | --------------------------------------------------------------------------- | diff --git a/docs/notifications.md b/docs/notifications.md index d5da4fe..d197ccb 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -1,11 +1,11 @@ # Notifications Watchtower can send notifications when containers are updated. Notifications are sent via hooks in the logging -system, [logrus](http://github.com/sirupsen/logrus). +system, [logrus](http://github.com/sirupsen/logrus). !!! note "Using multiple notifications with environment variables" There is currently a bug in Viper (https://github.com/spf13/viper/issues/380), which prevents comma-separated slices to - be used when using the environment variable. + be used when using the environment variable. A workaround is available where we instead put quotes around the environment variable value and replace the commas with spaces: ``` @@ -19,7 +19,7 @@ system, [logrus](http://github.com/sirupsen/logrus). - `--notifications-level` (env. `WATCHTOWER_NOTIFICATIONS_LEVEL`): Controls the log level which is used for the notifications. If omitted, the default log level is `info`. Possible values are: `panic`, `fatal`, `error`, `warn`, `info`, `debug` or `trace`. - `--notifications-hostname` (env. `WATCHTOWER_NOTIFICATIONS_HOSTNAME`): Custom hostname specified in subject/title. Useful to override the operating system hostname. - `--notifications-delay` (env. `WATCHTOWER_NOTIFICATIONS_DELAY`): Delay before sending notifications expressed in seconds. -- Watchtower will post a notification every time it is started. This behavior [can be changed](https://containrrr.github.io/watchtower/arguments/#without_sending_a_startup_message) with an argument. +- Watchtower will post a notification every time it is started. This behavior [can be changed](https://watchtower.devcdn.net/arguments/#without_sending_a_startup_message) with an argument. - `--notification-title-tag` (env. `WATCHTOWER_NOTIFICATION_TITLE_TAG`): Prefix to include in the title. Useful when running multiple watchtowers. - `--notification-skip-title` (env. `WATCHTOWER_NOTIFICATION_SKIP_TITLE`): Do not pass the title param to notifications. This will not pass a dynamic title override to notification services. If no title is configured for the service, it will remove the title all together. - `--notification-log-stdout` (env. `WATCHTOWER_NOTIFICATION_LOG_STDOUT`): Enable output from `logger://` shoutrrr service to stdout. @@ -54,7 +54,7 @@ outputs timestamp and log level. !!! tip "Custom date format" If you want to adjust the date/time format it must show how the [reference time](https://golang.org/pkg/time/#pkg-constants) (_Mon Jan 2 15:04:05 MST 2006_) would be displayed in your - custom format. + custom format. i.e., The day of the year has to be 1, the month has to be 2 (february), the hour 3 (or 15 for 24h time) etc. !!! note "Skipping notifications" @@ -69,7 +69,7 @@ docker run -d \ -v /var/run/docker.sock:/var/run/docker.sock \ -e WATCHTOWER_NOTIFICATION_URL="discord://token@channel slack://watchtower@token-a/token-b/token-c" \ -e WATCHTOWER_NOTIFICATION_TEMPLATE="{{range .}}{{.Time.Format \"2006-01-02 15:04:05\"}} ({{.Level}}): {{.Message}}{{println}}{{end}}" \ - containrrr/watchtower + beatkind/watchtower ``` ## Report templates @@ -138,16 +138,16 @@ Example using a custom report template that always sends a session report after {{range .Entries -}}{{.Message}}{{\"\n\"}}{{- end -}} {{- end -}} " \ - containrrr/watchtower + beatkind/watchtower ``` === "docker-compose" ``` yaml - version: "3" + services: watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock env: @@ -179,7 +179,7 @@ Example using a custom report template that always sends a session report after ## Legacy notifications -For backwards compatibility, the notifications can also be configured using legacy notification options. These will automatically be converted to shoutrrr URLs when used. +For backwards compatibility, the notifications can also be configured using legacy notification options. These will automatically be converted to shoutrrr URLs when used. The types of notifications to send are set by passing a comma-separated list of values to the `--notifications` option (or corresponding environment variable `WATCHTOWER_NOTIFICATIONS`), which has the following valid values: @@ -199,17 +199,17 @@ If watchtower is started with `notify-upgrade` as it's first argument, it will g -v /var/run/docker.sock:/var/run/docker.sock \ -e WATCHTOWER_NOTIFICATIONS=slack \ -e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL="https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy" \ - containrrr/watchtower \ + beatkind/watchtower \ notify-upgrade ``` === "docker-compose.yml" ```yaml - version: "3" + services: watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock env: @@ -228,16 +228,16 @@ You can then copy this file from the container (a message with the full command --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ --env-file watchtower-notifications.env \ - containrrr/watchtower + beatkind/watchtower ``` === "docker-compose.yml" ```yaml - version: "3" + services: watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock env_file: @@ -249,6 +249,7 @@ You can then copy this file from the container (a message with the full command To receive notifications by email, the following command-line options, or their corresponding environment variables, can be set: - `--notification-email-from` (env. `WATCHTOWER_NOTIFICATION_EMAIL_FROM`): The e-mail address from which notifications will be sent. +- `--notification-email-from-name` (env. `WATCHTOWER_NOTIFICATION_EMAIL_FROM_NAME`): The name from which notifications will be sent. - `--notification-email-to` (env. `WATCHTOWER_NOTIFICATION_EMAIL_TO`): The e-mail address to which notifications will be sent. - `--notification-email-server` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER`): The SMTP server to send e-mails through. - `--notification-email-server-tls-skip-verify` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_TLS_SKIP_VERIFY`): Do not verify the TLS certificate of the mail server. This should be used only for testing. @@ -272,7 +273,7 @@ docker run -d \ -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=fromaddress@gmail.com \ -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=app_password \ -e WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2 \ - containrrr/watchtower + beatkind/watchtower ``` The previous example assumes, that you already have an SMTP server up and running you can connect to. If you don't or you want to bring up watchtower with your own simple SMTP relay the following `docker-compose.yml` might be a good start for you. @@ -282,10 +283,9 @@ The following example assumes, that your domain is called `your-domain.com` and Example including an SMTP relay: ```yaml -version: '3.8' services: watchtower: - image: containrrr/watchtower:latest + image: beatkind/watchtower:latest container_name: watchtower environment: WATCHTOWER_MONITOR_ONLY: 'true' @@ -347,7 +347,7 @@ docker run -d \ -e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL="https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy" \ -e WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=watchtower-server-1 \ -e WATCHTOWER_NOTIFICATION_SLACK_CHANNEL=#my-custom-channel \ - containrrr/watchtower + beatkind/watchtower ``` ### Microsoft Teams @@ -367,7 +367,7 @@ docker run -d \ -e WATCHTOWER_NOTIFICATIONS=msteams \ -e WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL="https://outlook.office.com/webhook/xxxxxxxx@xxxxxxx/IncomingWebhook/yyyyyyyy/zzzzzzzzzz" \ -e WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true \ - containrrr/watchtower + beatkind/watchtower ``` ### Gotify @@ -381,10 +381,9 @@ docker run -d \ -e WATCHTOWER_NOTIFICATIONS=gotify \ -e WATCHTOWER_NOTIFICATION_GOTIFY_URL="https://my.gotify.tld/" \ -e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN="SuperSecretToken" \ - containrrr/watchtower + beatkind/watchtower ``` `-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN` or `--notification-gotify-token` can also reference a file, in which case the contents of the file are used. If you want to disable TLS verification for the Gotify instance, you can use either `-e WATCHTOWER_NOTIFICATION_GOTIFY_TLS_SKIP_VERIFY=true` or `--notification-gotify-tls-skip-verify`. - diff --git a/docs/private-registries.md b/docs/private-registries.md index 5367a8c..d3e54a7 100644 --- a/docs/private-registries.md +++ b/docs/private-registries.md @@ -1,6 +1,8 @@ +# Private Registries + Watchtower supports private Docker image registries. In many cases, accessing a private registry requires a valid username and password (i.e., _credentials_). In order to operate in such an -environment, watchtower needs to know the credentials to access the registry. +environment, watchtower needs to know the credentials to access the registry. The credentials can be provided to watchtower in a configuration file called `config.json`. There are two ways to generate this configuration file: @@ -8,7 +10,8 @@ There are two ways to generate this configuration file: * The configuration file can be created manually. * Call `docker login ` and share the resulting configuration file. -### Create the configuration file manually +## Create the configuration file manually + Create a new configuration file with the following syntax and a base64 encoded username and password `auth` string: @@ -31,7 +34,7 @@ password `auth` string: In this special case, the registry domain does not have to be specified in `docker run` or `docker-compose`. Like Docker, Watchtower will use the Docker Hub registry and its credentials when no registry domain is specified. - + Watchtower will recognize credentials with `` `index.docker.io`, but the Docker CLI will not. @@ -40,7 +43,7 @@ password `auth` string: in both `config.json` and the `docker run` command or `docker-compose` file. Valid hosts are `localhost[:PORT]`, `HOST:PORT`, or any multi-part `domain.name` or IP-address with or without a port. - + Examples: * `localhost` -> `localhost/myimage` * `127.0.0.1` -> `127.0.0.1/myimage:mytag` @@ -63,10 +66,10 @@ When the watchtower Docker container is started, the created configuration file (`/config.json` in this example) needs to be passed to the container: ```bash -docker run [...] -v /config.json:/config.json containrrr/watchtower +docker run [...] -v /config.json:/config.json beatkind/watchtower ``` -### Share the Docker configuration file +## Share the Docker configuration file To pull an image from a private registry, `docker login` needs to be called first, to get access to the registry. The provided credentials are stored in a configuration file called `/.docker/config.json`. @@ -76,7 +79,7 @@ additional configuration file is not necessary. When the Docker container is started, pass the configuration file to watchtower: ```bash -docker run [...] -v /.docker/config.json:/config.json containrrr/watchtower +docker run [...] -v /.docker/config.json:/config.json beatkind/watchtower ``` When creating the watchtower container via docker-compose, use the following lines: @@ -85,23 +88,24 @@ When creating the watchtower container via docker-compose, use the following lin version: "3.4" services: watchtower: - image: containrrr/watchtower:latest + image: beatkind/watchtower:latest volumes: - /var/run/docker.sock:/var/run/docker.sock - /.docker/config.json:/config.json ... ``` -#### Docker Config path +### Docker Config path + By default, watchtower will look for the `config.json` file in `/`, but this can be changed by setting the `DOCKER_CONFIG` environment variable to the directory path where your config is located. This is useful for setups where the config.json file is changed while the watchtower instance is running, as the changes will not be picked up for a mounted file if the inode changes. Example usage: ```yaml version: "3.4" -services: +services: watchtower: - image: containrrr/watchtower + image: beatkind/watchtower environment: DOCKER_CONFIG: /config volumes: @@ -110,6 +114,7 @@ services: ``` ## Credential helpers + Some private Docker registries (the most prominent probably being AWS ECR) use non-standard ways of authentication. To be able to use this together with watchtower, we need to use a credential helper. @@ -117,6 +122,7 @@ To keep the image size small we've decided to not include any helpers in the wat helper in a separate container and mount it using volumes. ### Example + Example implementation for use with [amazon-ecr-credential-helper](https://github.com/awslabs/amazon-ecr-credential-helper): Use the dockerfile below to build the [amazon-ecr-credential-helper](https://github.com/awslabs/amazon-ecr-credential-helper), @@ -125,30 +131,30 @@ in a volume that may be mounted onto your watchtower container. 1. Create the Dockerfile (contents below): ```Dockerfile FROM golang:1.20 - + ENV GO111MODULE off ENV CGO_ENABLED 0 ENV REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login - + RUN go get -u $REPO - + RUN rm /go/bin/docker-credential-ecr-login - + RUN go build \ -o /go/bin/docker-credential-ecr-login \ /go/src/$REPO - + WORKDIR /go/bin/ ``` 2. Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume: ```bash # Create a volume to store the command (once built) - docker volume create helper - + docker volume create helper + # Build the container docker build -t aws-ecr-dock-cred-helper . - + # Build the command and store it in the new volume in the /go/bin directory. docker run -d --rm --name aws-cred-helper \ --volume helper:/go/bin aws-ecr-dock-cred-helper @@ -178,7 +184,7 @@ in a volume that may be mounted onto your watchtower container. # Check for new images and restart things if a new image exists # for any of our containers. watchtower: - image: containrrr/watchtower:latest + image: beatkind/watchtower:latest volumes: - /var/run/docker.sock:/var/run/docker.sock - .docker/config.json:/config.json @@ -188,20 +194,20 @@ in a volume that may be mounted onto your watchtower container. - PATH=$PATH:/go/bin - AWS_REGION=us-west-1 volumes: - helper: + helper: external: true ``` A few additional notes: -1. With docker-compose the volume (helper, in this case) MUST be set to `external: true`, otherwise docker-compose +1. With docker-compose the volume (helper, in this case) MUST be set to `external: true`, otherwise docker-compose will preface it with the directory name. -2. Note that "credsStore" : "ecr-login" is needed - and in theory if you have that you can remove the +2. Note that "credsStore" : "ecr-login" is needed - and in theory if you have that you can remove the credHelpers section -3. I have this running on an EC2 instance that has credentials assigned to it - so no keys are needed; however, +3. I have this running on an EC2 instance that has credentials assigned to it - so no keys are needed; however, you may need to include the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables as well. -4. An alternative to adding the various variables is to create a ~/.aws/config and ~/.aws/credentials files and +4. An alternative to adding the various variables is to create a ~/.aws/config and ~/.aws/credentials files and place the settings there, then mount the ~/.aws directory to / in the container. diff --git a/docs/remote-hosts.md b/docs/remote-hosts.md index 22c3f94..d6b4b95 100644 --- a/docs/remote-hosts.md +++ b/docs/remote-hosts.md @@ -1,9 +1,11 @@ +# Remote Docker Hosts + By default, watchtower is set-up to monitor the local Docker daemon (the same daemon running the watchtower container itself). However, it is possible to configure watchtower to monitor a remote Docker endpoint. When starting the watchtower container you can specify a remote Docker endpoint with either the `--host` flag or the `DOCKER_HOST` environment variable: ```bash docker run -d \ --name watchtower \ - containrrr/watchtower --host "tcp://10.0.1.2:2375" + beatkind/watchtower --host "tcp://10.0.1.2:2375" ``` or @@ -12,7 +14,7 @@ or docker run -d \ --name watchtower \ -e DOCKER_HOST="tcp://10.0.1.2:2375" \ - containrrr/watchtower + beatkind/watchtower ``` Note in both of the examples above that it is unnecessary to mount the _/var/run/docker.sock_ into the watchtower container. diff --git a/docs/running-multiple-instances.md b/docs/running-multiple-instances.md index 5a82c80..fc1e6d6 100644 --- a/docs/running-multiple-instances.md +++ b/docs/running-multiple-instances.md @@ -1,4 +1,4 @@ -By default, Watchtower will clean up other instances and won't allow multiple instances running on the same Docker host or swarm. It is possible to override this behavior by defining a [scope](https://containrrr.github.io/watchtower/arguments/#filter_by_scope) to each running instance. +By default, Watchtower will clean up other instances and won't allow multiple instances running on the same Docker host or swarm. It is possible to override this behavior by defining a [scope](https://watchtower.devcdn.net/arguments/#filter_by_scope) to each running instance. !!! note - Multiple instances can't run with the same scope; @@ -10,7 +10,7 @@ To define an instance monitoring scope, use the `--scope` argument or the `WATCH For example, in a Docker Compose config file: ```yaml -version: '3' + services: app-with-scope: @@ -18,10 +18,10 @@ services: labels: [ "com.centurylinklabs.watchtower.scope=myscope" ] scoped-watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: [ "/var/run/docker.sock:/var/run/docker.sock" ] command: --interval 30 --scope myscope - labels: [ "com.centurylinklabs.watchtower.scope=myscope" ] + labels: [ "com.centurylinklabs.watchtower.scope=myscope" ] unscoped-app-a: image: myapps/app-a @@ -29,13 +29,13 @@ services: unscoped-app-b: image: myapps/app-b labels: [ "com.centurylinklabs.watchtower.scope=none" ] - + unscoped-app-c: image: myapps/app-b labels: [ "com.centurylinklabs.watchtower.scope=" ] - + unscoped-watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: [ "/var/run/docker.sock:/var/run/docker.sock" ] command: --interval 30 --scope none ``` diff --git a/docs/secure-connections.md b/docs/secure-connections.md index 0c2a900..4b73bd7 100644 --- a/docs/secure-connections.md +++ b/docs/secure-connections.md @@ -1,3 +1,5 @@ +# Secure Connections + Watchtower is also capable of connecting to Docker endpoints which are protected by SSL/TLS. If you've used _docker-machine_ to provision your remote Docker host, you simply need to volume mount the certificates generated by _docker-machine_ into the watchtower container and optionally specify `--tlsverify` flag. The _docker-machine_ certificates for a particular host can be located by executing the `docker-machine env` command for the desired host (note the values for the `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables that are returned from this command). The directory containing the certificates for the remote host needs to be mounted into the watchtower container at _/etc/ssl/docker_. @@ -10,5 +12,5 @@ docker run -d \ -e DOCKER_HOST=$DOCKER_HOST \ -e DOCKER_CERT_PATH=/etc/ssl/docker \ -v $DOCKER_CERT_PATH:/etc/ssl/docker \ - containrrr/watchtower --tlsverify + beatkind/watchtower --tlsverify ``` diff --git a/docs/stop-signals.md b/docs/stop-signals.md index f4b4f1d..bf2706b 100644 --- a/docs/stop-signals.md +++ b/docs/stop-signals.md @@ -1,3 +1,5 @@ +# Stop signals + When watchtower detects that a running container needs to be updated it will stop the container by sending it a SIGTERM signal. If your container should be shutdown with a different signal you can communicate this to watchtower by setting a label named _com.centurylinklabs.watchtower.stop-signal_ with the value of the desired signal. diff --git a/docs/updating.md b/docs/updating.md index 952a0f9..ded9bdd 100644 --- a/docs/updating.md +++ b/docs/updating.md @@ -1,6 +1,6 @@ -## Updating Watchtower +# Updating Watchtower -If watchtower is monitoring the same Docker daemon under which the watchtower container itself is running (i.e. if you -volume-mounted `/var/run/docker.sock` into the watchtower container) then it has the ability to update itself. -If a new version of the `containrrr/watchtower` image is pushed to the Docker Hub, your watchtower will pull down the +If watchtower is monitoring the same Docker daemon under which the watchtower container itself is running (i.e. if you +volume-mounted `/var/run/docker.sock` into the watchtower container) then it has the ability to update itself. +If a new version of the `beatkind/watchtower` image is pushed to the Docker Hub, your watchtower will pull down the new image and restart itself automatically. diff --git a/docs/usage-overview.md b/docs/usage-overview.md index 1cac352..1a8fc8c 100644 --- a/docs/usage-overview.md +++ b/docs/usage-overview.md @@ -1,14 +1,21 @@ -Watchtower is itself packaged as a Docker container so installation is as simple as pulling the `containrrr/watchtower` image. If you are using ARM based architecture, pull the appropriate `containrrr/watchtower:armhf-` image from the [containrrr Docker Hub](https://hub.docker.com/r/containrrr/watchtower/tags/). +# Usage + +Watchtower is itself packaged as a Docker container so installation is as simple as pulling the `beatkind/watchtower` image. If you are using ARM based architecture, pull the appropriate `beatkind/watchtower:armhf-` image from the [beatkind Docker Hub](https://hub.docker.com/r/beatkind/watchtower/tags/). Since the watchtower code needs to interact with the Docker API in order to monitor the running containers, you need to mount _/var/run/docker.sock_ into the container with the `-v` flag when you run it. +!!! warning "Minimum Docker API version" + Watchtower is by default supporting the last supported version of Docker, which can be found [here](https://endoflife.date/docker-engine). The maximum version number for the oldest supported version of Docker can be found inside the [Docker docs](https://docs.docker.com/reference/api/engine/#api-version-matrix). + + If you are using a version of Docker that is older than the minimum supported version, you will need to set the environment variable `DOCKER_API_VERSION` to the minimum supported version. For example, if you are using Docker 24.0, you would set `DOCKER_API_VERSION=1.43`. + Run the `watchtower` container with the following command: ```bash docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower + beatkind/watchtower ``` If pulling images from private Docker registries, supply registry authentication credentials with the environment variables `REPO_USER` and `REPO_PASS` @@ -22,7 +29,7 @@ docker run -d \ -e REPO_USER=username \ -e REPO_PASS=password \ -v /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower container_to_watch --debug + beatkind/watchtower container_to_watch --debug ``` Also check out [this Stack Overflow answer](https://stackoverflow.com/a/30494145/7872793) for more options on how to pass environment variables. @@ -34,15 +41,15 @@ docker run -d \ --name watchtower \ -v $HOME/.docker/config.json:/config.json \ -v /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower container_to_watch --debug + beatkind/watchtower container_to_watch --debug ``` !!! note "Changes to config.json while running" If you mount `config.json` in the manner above, changes from the host system will (generally) not be propagated to the running container. Mounting files into the Docker daemon uses bind mounts, which are based on inodes. Most applications (including `docker login` and `vim`) will not directly edit the file, but instead make a copy and replace - the original file, which results in a new inode which in turn _breaks_ the bind mount. - **As a workaround**, you can create a symlink to your `config.json` file and then mount the symlink in the container. + the original file, which results in a new inode which in turn _breaks_ the bind mount. + **As a workaround**, you can create a symlink to your `config.json` file and then mount the symlink in the container. The symlinked file will always have the same inode, which keeps the bind mount intact and will ensure changes to the original file are propagated to the running container (regardless of the inode of the source file!). @@ -52,7 +59,7 @@ from a private repo on the GitHub Registry and monitors it with watchtower. Note to 30s rather than the default 24 hours. ```yaml -version: "3" + services: cavo: image: ghcr.io//: @@ -60,7 +67,7 @@ services: - "443:3443" - "80:3080" watchtower: - image: containrrr/watchtower + image: beatkind/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock - /root/.docker/config.json:/config.json diff --git a/go.mod b/go.mod index 6c20d11..5d00dc8 100644 --- a/go.mod +++ b/go.mod @@ -1,74 +1,81 @@ -module github.com/containrrr/watchtower +module github.com/beatkind/watchtower -go 1.20 +go 1.24 require ( github.com/containrrr/shoutrrr v0.8.0 - github.com/distribution/reference v0.5.0 - github.com/docker/cli v24.0.7+incompatible - github.com/docker/docker v24.0.7+incompatible - github.com/docker/go-connections v0.4.0 - github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.30.0 - github.com/prometheus/client_golang v1.18.0 + github.com/distribution/reference v0.6.0 + github.com/docker/cli v28.2.2+incompatible + github.com/docker/docker v28.1.1+incompatible + github.com/docker/go-connections v0.5.0 + github.com/onsi/ginkgo/v2 v2.23.3 + github.com/onsi/gomega v1.36.3 + github.com/prometheus/client_golang v1.22.0 github.com/robfig/cron v1.2.0 github.com/sirupsen/logrus v1.9.3 - github.com/spf13/cobra v1.8.0 - github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.18.2 - github.com/stretchr/testify v1.8.4 - golang.org/x/net v0.19.0 + github.com/spf13/cobra v1.9.1 + github.com/spf13/pflag v1.0.6 + github.com/spf13/viper v1.20.1 + github.com/stretchr/testify v1.10.0 + golang.org/x/net v0.41.0 ) -require github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect +require ( + github.com/containerd/log v0.1.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e // indirect + github.com/klauspost/compress v1.18.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/tools v0.33.0 // indirect +) require ( - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker-credential-helpers v0.6.1 // indirect - github.com/docker/go-units v0.4.0 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/docker/docker-credential-helpers v0.9.3 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect - github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect - github.com/nxadm/tail v1.4.8 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/moby/term v0.5.2 // indirect + github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/sagikazarmark/locafero v0.4.0 // indirect - github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.63.0 // indirect + github.com/prometheus/procfs v0.16.0 // indirect + github.com/sagikazarmark/locafero v0.9.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect - github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/spf13/afero v1.14.0 // indirect + github.com/spf13/cast v1.7.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect - go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.9.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/text v0.14.0 - golang.org/x/time v0.5.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/text v0.26.0 + golang.org/x/time v0.11.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.0.3 // indirect ) diff --git a/go.sum b/go.sum index cab338f..15fca1f 100644 --- a/go.sum +++ b/go.sum @@ -1,240 +1,241 @@ -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containrrr/shoutrrr v0.8.0 h1:mfG2ATzIS7NR2Ec6XL+xyoHzN97H8WPjir8aYzJUSec= github.com/containrrr/shoutrrr v0.8.0/go.mod h1:ioyQAyu1LJY6sILuNyKaQaw+9Ttik5QePU8atnAdO2o= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= -github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= -github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.1 h1:Dq4iIfcM7cNtddhLVWe9h4QDjsi4OER3Z8voPu/I52g= -github.com/docker/docker-credential-helpers v0.6.1/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/cli v28.0.4+incompatible h1:pBJSJeNd9QeIWPjRcV91RVJihd/TXB77q1ef64XEu4A= +github.com/docker/cli v28.0.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k= +github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v28.2.2+incompatible h1:qzx5BNUDFqlvyq4AHzdNB7gSyVTmU4cgsyN9SdInc1A= +github.com/docker/cli v28.2.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v28.0.4+incompatible h1:JNNkBctYKurkw6FrHfKqY0nKIDf5nrbxjVBtS+cdcok= +github.com/docker/docker v28.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I= +github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8= +github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= -github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= -github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.23.3 h1:edHxnszytJ4lD9D5Jjc4tiDkPBZ3siDeJJkUZJJVkp0= +github.com/onsi/ginkgo/v2 v2.23.3/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM= +github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU= +github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= +github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= +github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= +github.com/prometheus/procfs v0.16.0 h1:xh6oHhKwnOJKMYiYBDWmkHqQPyiY40sny36Cmx2bbsM= +github.com/prometheus/procfs v0.16.0/go.mod h1:8veyXUu3nGP7oaCxhX6yeaM5u4stL2FeMXnCqhDthZg= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= -github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= -github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= -github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFTqyMTC9k= +github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= -github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA= +github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo= +github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= +github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= +github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= +golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= diff --git a/goreleaser.yml b/goreleaser.yml index 1904d5e..a11364b 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -10,7 +10,7 @@ build: - arm - arm64 ldflags: - - -s -w -X github.com/containrrr/watchtower/internal/meta.Version={{.Version}} + - -s -w -X github.com/beatkind/watchtower/internal/meta.Version={{.Version}} archives: - name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}" @@ -36,12 +36,8 @@ dockers: goarm: '' dockerfile: dockerfiles/Dockerfile image_templates: - - containrrr/watchtower:amd64-{{ .Version }} - - containrrr/watchtower:amd64-latest - - ghcr.io/containrrr/watchtower:amd64-{{ .Version }} - - ghcr.io/containrrr/watchtower:amd64-latest - binaries: - - watchtower + - beatkind/watchtower:amd64-{{ .Version }} + - beatkind/watchtower:amd64-latest - use_buildx: true build_flag_templates: [ "--platform=linux/386" ] @@ -50,12 +46,8 @@ dockers: goarm: '' dockerfile: dockerfiles/Dockerfile image_templates: - - containrrr/watchtower:i386-{{ .Version }} - - containrrr/watchtower:i386-latest - - ghcr.io/containrrr/watchtower:i386-{{ .Version }} - - ghcr.io/containrrr/watchtower:i386-latest - binaries: - - watchtower + - beatkind/watchtower:i386-{{ .Version }} + - beatkind/watchtower:i386-latest - use_buildx: true build_flag_templates: [ "--platform=linux/arm/v6" ] @@ -64,12 +56,8 @@ dockers: goarm: 6 dockerfile: dockerfiles/Dockerfile image_templates: - - containrrr/watchtower:armhf-{{ .Version }} - - containrrr/watchtower:armhf-latest - - ghcr.io/containrrr/watchtower:armhf-{{ .Version }} - - ghcr.io/containrrr/watchtower:armhf-latest - binaries: - - watchtower + - beatkind/watchtower:armhf-{{ .Version }} + - beatkind/watchtower:armhf-latest - use_buildx: true build_flag_templates: [ "--platform=linux/arm64/v8" ] @@ -78,9 +66,5 @@ dockers: goarm: '' dockerfile: dockerfiles/Dockerfile image_templates: - - containrrr/watchtower:arm64v8-{{ .Version }} - - containrrr/watchtower:arm64v8-latest - - ghcr.io/containrrr/watchtower:arm64v8-{{ .Version }} - - ghcr.io/containrrr/watchtower:arm64v8-latest - binaries: - - watchtower + - beatkind/watchtower:arm64v8-{{ .Version }} + - beatkind/watchtower:arm64v8-latest \ No newline at end of file diff --git a/internal/actions/actions_suite_test.go b/internal/actions/actions_suite_test.go index c320564..aa30769 100644 --- a/internal/actions/actions_suite_test.go +++ b/internal/actions/actions_suite_test.go @@ -6,11 +6,11 @@ import ( "github.com/sirupsen/logrus" - "github.com/containrrr/watchtower/internal/actions" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/internal/actions" + "github.com/beatkind/watchtower/pkg/types" - . "github.com/containrrr/watchtower/internal/actions/mocks" - . "github.com/onsi/ginkgo" + . "github.com/beatkind/watchtower/internal/actions/mocks" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/internal/actions/check.go b/internal/actions/check.go index 77a2266..af46081 100644 --- a/internal/actions/check.go +++ b/internal/actions/check.go @@ -5,10 +5,10 @@ import ( "sort" "time" - "github.com/containrrr/watchtower/pkg/container" - "github.com/containrrr/watchtower/pkg/filters" - "github.com/containrrr/watchtower/pkg/sorter" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/container" + "github.com/beatkind/watchtower/pkg/filters" + "github.com/beatkind/watchtower/pkg/sorter" + "github.com/beatkind/watchtower/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/internal/actions/mocks/client.go b/internal/actions/mocks/client.go index 737404a..6d5d6aa 100644 --- a/internal/actions/mocks/client.go +++ b/internal/actions/mocks/client.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - t "github.com/containrrr/watchtower/pkg/types" + t "github.com/beatkind/watchtower/pkg/types" ) // MockClient is a mock that passes as a watchtower Client diff --git a/internal/actions/mocks/container.go b/internal/actions/mocks/container.go index e830587..3d464c5 100644 --- a/internal/actions/mocks/container.go +++ b/internal/actions/mocks/container.go @@ -6,17 +6,17 @@ import ( "strings" "time" - "github.com/containrrr/watchtower/pkg/container" - wt "github.com/containrrr/watchtower/pkg/types" - "github.com/docker/docker/api/types" + "github.com/beatkind/watchtower/pkg/container" + wt "github.com/beatkind/watchtower/pkg/types" dockerContainer "github.com/docker/docker/api/types/container" + dockerImage "github.com/docker/docker/api/types/image" "github.com/docker/go-connections/nat" ) // CreateMockContainer creates a container substitute valid for testing func CreateMockContainer(id string, name string, image string, created time.Time) wt.Container { - content := types.ContainerJSON{ - ContainerJSONBase: &types.ContainerJSONBase{ + content := dockerContainer.InspectResponse{ + ContainerJSONBase: &dockerContainer.ContainerJSONBase{ ID: id, Image: image, Name: name, @@ -38,24 +38,24 @@ func CreateMockContainer(id string, name string, image string, created time.Time } // CreateMockImageInfo returns a mock image info struct based on the passed image -func CreateMockImageInfo(image string) *types.ImageInspect { - return &types.ImageInspect{ - ID: image, - RepoDigests: []string{ - image, - }, - } +func CreateMockImageInfo(image string) *dockerImage.InspectResponse { + return &dockerImage.InspectResponse{ + ID: image, + RepoTags: []string{ + image, + }, + } } // CreateMockContainerWithImageInfo should only be used for testing -func CreateMockContainerWithImageInfo(id string, name string, image string, created time.Time, imageInfo types.ImageInspect) wt.Container { +func CreateMockContainerWithImageInfo(id string, name string, image string, created time.Time, imageInfo dockerImage.InspectResponse) wt.Container { return CreateMockContainerWithImageInfoP(id, name, image, created, &imageInfo) } // CreateMockContainerWithImageInfoP should only be used for testing -func CreateMockContainerWithImageInfoP(id string, name string, image string, created time.Time, imageInfo *types.ImageInspect) wt.Container { - content := types.ContainerJSON{ - ContainerJSONBase: &types.ContainerJSONBase{ +func CreateMockContainerWithImageInfoP(id string, name string, image string, created time.Time, imageInfo *dockerImage.InspectResponse) wt.Container { + content := dockerContainer.InspectResponse{ + ContainerJSONBase: &dockerContainer.ContainerJSONBase{ ID: id, Image: image, Name: name, @@ -81,12 +81,12 @@ func CreateMockContainerWithDigest(id string, name string, image string, created // CreateMockContainerWithConfig creates a container substitute valid for testing func CreateMockContainerWithConfig(id string, name string, image string, running bool, restarting bool, created time.Time, config *dockerContainer.Config) wt.Container { - content := types.ContainerJSON{ - ContainerJSONBase: &types.ContainerJSONBase{ + content := dockerContainer.InspectResponse{ + ContainerJSONBase: &dockerContainer.ContainerJSONBase{ ID: id, Image: image, Name: name, - State: &types.ContainerState{ + State: &dockerContainer.State{ Running: running, Restarting: restarting, }, @@ -120,9 +120,9 @@ func CreateContainerForProgress(index int, idPrefix int, nameFormat string) (wt. } // CreateMockContainerWithLinks should only be used for testing -func CreateMockContainerWithLinks(id string, name string, image string, created time.Time, links []string, imageInfo *types.ImageInspect) wt.Container { - content := types.ContainerJSON{ - ContainerJSONBase: &types.ContainerJSONBase{ +func CreateMockContainerWithLinks(id string, name string, image string, created time.Time, links []string, imageInfo *dockerImage.InspectResponse) wt.Container { + content := dockerContainer.InspectResponse{ + ContainerJSONBase: &dockerContainer.ContainerJSONBase{ ID: id, Image: image, Name: name, diff --git a/internal/actions/mocks/progress.go b/internal/actions/mocks/progress.go index 23fc441..ddfec84 100644 --- a/internal/actions/mocks/progress.go +++ b/internal/actions/mocks/progress.go @@ -3,8 +3,8 @@ package mocks import ( "errors" - "github.com/containrrr/watchtower/pkg/session" - wt "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/session" + wt "github.com/beatkind/watchtower/pkg/types" ) // CreateMockProgressReport creates a mock report from a given set of container states diff --git a/internal/actions/update.go b/internal/actions/update.go index 8853c6e..e3460a5 100644 --- a/internal/actions/update.go +++ b/internal/actions/update.go @@ -3,12 +3,12 @@ package actions import ( "errors" - "github.com/containrrr/watchtower/internal/util" - "github.com/containrrr/watchtower/pkg/container" - "github.com/containrrr/watchtower/pkg/lifecycle" - "github.com/containrrr/watchtower/pkg/session" - "github.com/containrrr/watchtower/pkg/sorter" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/internal/util" + "github.com/beatkind/watchtower/pkg/container" + "github.com/beatkind/watchtower/pkg/lifecycle" + "github.com/beatkind/watchtower/pkg/session" + "github.com/beatkind/watchtower/pkg/sorter" + "github.com/beatkind/watchtower/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/internal/actions/update_test.go b/internal/actions/update_test.go index 9209dcd..2dbf111 100644 --- a/internal/actions/update_test.go +++ b/internal/actions/update_test.go @@ -3,14 +3,14 @@ package actions_test import ( "time" - "github.com/containrrr/watchtower/internal/actions" - "github.com/containrrr/watchtower/pkg/types" - dockerTypes "github.com/docker/docker/api/types" + "github.com/beatkind/watchtower/internal/actions" + "github.com/beatkind/watchtower/pkg/types" dockerContainer "github.com/docker/docker/api/types/container" + dockerImage "github.com/docker/docker/api/types/image" "github.com/docker/go-connections/nat" - . "github.com/containrrr/watchtower/internal/actions/mocks" - . "github.com/onsi/ginkgo" + . "github.com/beatkind/watchtower/internal/actions/mocks" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -44,7 +44,7 @@ func getLinkedTestData(withImageInfo bool) *TestData { "fake-image1:latest", time.Now().AddDate(0, 0, -1)) - var imageInfo *dockerTypes.ImageInspect + var imageInfo *dockerImage.InspectResponse if withImageInfo { imageInfo = CreateMockImageInfo("test-container-02") } diff --git a/internal/flags/flags.go b/internal/flags/flags.go index c11cdae..9b722bb 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -17,7 +17,7 @@ import ( // DockerAPIMinVersion is the minimum version of the docker api required to // use watchtower -const DockerAPIMinVersion string = "1.25" +const DockerAPIMinVersion string = "1.44" var defaultInterval = int((time.Hour * 24).Seconds()) @@ -211,6 +211,12 @@ func RegisterSystemFlags(rootCmd *cobra.Command) { "", envBool("WATCHTOWER_LABEL_TAKE_PRECEDENCE"), "Label applied to containers take precedence over arguments") + + flags.BoolP( + "disable-memory-swappiness", + "", + envBool("WATCHTOWER_DISABLE_MEMORY_SWAPPINESS"), + "Label used for setting memory swappiness as nil when recreating the container, used for compatibility with podman") } // RegisterNotificationFlags that are used by watchtower to send notifications @@ -246,6 +252,12 @@ func RegisterNotificationFlags(rootCmd *cobra.Command) { envString("WATCHTOWER_NOTIFICATION_EMAIL_FROM"), "Address to send notification emails from") + flags.StringP( + "notification-email-from-name", + "", + envString("WATCHTOWER_NOTIFICATION_EMAIL_FROM_NAME"), + "Name to send notification emails from") + flags.StringP( "notification-email-to", "", @@ -425,11 +437,13 @@ func SetDefaults() { viper.SetDefault("WATCHTOWER_TIMEOUT", time.Second*10) viper.SetDefault("WATCHTOWER_NOTIFICATIONS", []string{}) viper.SetDefault("WATCHTOWER_NOTIFICATIONS_LEVEL", "info") + viper.SetDefault("WATCHTOWER_NOTIFICATION_EMAIL_FROM", "Watchtower") viper.SetDefault("WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT", 25) viper.SetDefault("WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG", "") viper.SetDefault("WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER", "watchtower") viper.SetDefault("WATCHTOWER_LOG_LEVEL", "info") viper.SetDefault("WATCHTOWER_LOG_FORMAT", "auto") + viper.SetDefault("WATCHTOWER_DISABLE_MEMORY_SWAPPINESS", false) } // EnvConfig translates the command-line options into environment variables diff --git a/main.go b/main.go index 9f8a012..34ab903 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/containrrr/watchtower/cmd" + "github.com/beatkind/watchtower/cmd" log "github.com/sirupsen/logrus" ) diff --git a/mkdocs.yml b/mkdocs.yml index 5227004..8c880d0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,6 @@ site_name: Watchtower -site_url: https://containrrr.dev/watchtower/ -repo_url: https://github.com/containrrr/watchtower/ +site_url: https://watchtower.devcdn.net/ +repo_url: https://github.com/beatkind/watchtower/ edit_uri: edit/main/docs/ theme: name: 'material' diff --git a/pkg/api/api_test.go b/pkg/api/api_test.go index 4e9110b..3851bf7 100644 --- a/pkg/api/api_test.go +++ b/pkg/api/api_test.go @@ -6,12 +6,12 @@ import ( "net/http/httptest" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) const ( - token = "123123123" + token = "123123123" ) func TestAPI(t *testing.T) { @@ -51,7 +51,7 @@ var _ = Describe("API", func() { rec := httptest.NewRecorder() req := httptest.NewRequest("GET", "/hello", nil) - req.Header.Set("Authorization", "Bearer " + token) + req.Header.Set("Authorization", "Bearer "+token) handlerFunc(rec, req) diff --git a/pkg/api/metrics/metrics.go b/pkg/api/metrics/metrics.go index 4faad4a..876e118 100644 --- a/pkg/api/metrics/metrics.go +++ b/pkg/api/metrics/metrics.go @@ -1,7 +1,7 @@ package metrics import ( - "github.com/containrrr/watchtower/pkg/metrics" + "github.com/beatkind/watchtower/pkg/metrics" "net/http" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/pkg/api/metrics/metrics_test.go b/pkg/api/metrics/metrics_test.go index 48b6dd7..9c70608 100644 --- a/pkg/api/metrics/metrics_test.go +++ b/pkg/api/metrics/metrics_test.go @@ -8,12 +8,12 @@ import ( "strings" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/containrrr/watchtower/pkg/api" - metricsAPI "github.com/containrrr/watchtower/pkg/api/metrics" - "github.com/containrrr/watchtower/pkg/metrics" + "github.com/beatkind/watchtower/pkg/api" + metricsAPI "github.com/beatkind/watchtower/pkg/api/metrics" + "github.com/beatkind/watchtower/pkg/metrics" ) const ( diff --git a/pkg/container/cgroup_id.go b/pkg/container/cgroup_id.go index 1da1dfe..2e690b4 100644 --- a/pkg/container/cgroup_id.go +++ b/pkg/container/cgroup_id.go @@ -5,7 +5,7 @@ import ( "os" "regexp" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/types" ) var dockerContainerPattern = regexp.MustCompile(`[0-9]+:.*:/docker/([a-f|0-9]{64})`) diff --git a/pkg/container/cgroup_id_test.go b/pkg/container/cgroup_id_test.go index 5f694e3..2b5de9c 100644 --- a/pkg/container/cgroup_id_test.go +++ b/pkg/container/cgroup_id_test.go @@ -1,7 +1,7 @@ package container import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/container/client.go b/pkg/container/client.go index c6c37de..fdb6787 100644 --- a/pkg/container/client.go +++ b/pkg/container/client.go @@ -7,20 +7,23 @@ import ( "strings" "time" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/network" sdkClient "github.com/docker/docker/client" log "github.com/sirupsen/logrus" "golang.org/x/net/context" - "github.com/containrrr/watchtower/pkg/registry" - "github.com/containrrr/watchtower/pkg/registry/digest" - t "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/registry" + "github.com/beatkind/watchtower/pkg/registry/digest" + t "github.com/beatkind/watchtower/pkg/types" ) -const defaultStopSignal = "SIGTERM" +const ( + defaultStopSignal = "SIGTERM" + openContainerVersion = "org.opencontainers.image.version" +) // A Client is the interface through which watchtower interacts with the // Docker API. @@ -57,11 +60,12 @@ func NewClient(opts ClientOptions) Client { // ClientOptions contains the options for how the docker client wrapper should behave type ClientOptions struct { - RemoveVolumes bool - IncludeStopped bool - ReviveStopped bool - IncludeRestarting bool - WarnOnHeadFailed WarningStrategy + RemoveVolumes bool + IncludeStopped bool + ReviveStopped bool + IncludeRestarting bool + DisableMemorySwappiness bool + WarnOnHeadFailed WarningStrategy } // WarningStrategy is a value determining when to show warnings @@ -77,7 +81,7 @@ const ( ) type dockerClient struct { - api sdkClient.CommonAPIClient + api sdkClient.APIClient ClientOptions } @@ -109,7 +113,7 @@ func (client dockerClient) ListContainers(fn t.Filter) ([]t.Container, error) { filter := client.createListFilter() containers, err := client.api.ContainerList( bg, - types.ContainerListOptions{ + container.ListOptions{ Filters: filter, }) @@ -172,7 +176,7 @@ func (client dockerClient) GetContainer(containerID t.ContainerID) (t.Container, } } - imageInfo, _, err := client.api.ImageInspectWithRaw(bg, containerInfo.Image) + imageInfo, err := client.api.ImageInspect(bg, containerInfo.Image) if err != nil { log.Warnf("Failed to retrieve container image info: %v", err) return &Container{containerInfo: &containerInfo, imageInfo: nil}, nil @@ -192,6 +196,10 @@ func (client dockerClient) StopContainer(c t.Container, timeout time.Duration) e shortID := c.ID().ShortID() if c.IsRunning() { + openVer, ok := c.ContainerInfo().Config.Labels[openContainerVersion] + if ok { + shortID = fmt.Sprintf("%s - %s", shortID, openVer) + } log.Infof("Stopping %s (%s) with %s", c.Name(), shortID, signal) if err := client.api.ContainerKill(bg, idStr, signal); err != nil { return err @@ -206,7 +214,7 @@ func (client dockerClient) StopContainer(c t.Container, timeout time.Duration) e } else { log.Debugf("Removing container %s", shortID) - if err := client.api.ContainerRemove(bg, idStr, types.ContainerRemoveOptions{Force: true, RemoveVolumes: client.RemoveVolumes}); err != nil { + if err := client.api.ContainerRemove(bg, idStr, container.RemoveOptions{Force: true, RemoveVolumes: client.RemoveVolumes}); err != nil { if sdkClient.IsErrNotFound(err) { log.Debugf("Container %s not found, skipping removal.", shortID) return nil @@ -251,6 +259,11 @@ func (client dockerClient) StartContainer(c t.Container) (t.ContainerID, error) hostConfig := c.GetCreateHostConfig() networkConfig := client.GetNetworkConfig(c) + // this is a flag set for podman compatibility + if client.DisableMemorySwappiness { + hostConfig.MemorySwappiness = nil + } + // simpleNetworkConfig is a networkConfig with only 1 network. // see: https://github.com/docker/docker/issues/29265 simpleNetworkConfig := func() *network.NetworkingConfig { @@ -303,7 +316,7 @@ func (client dockerClient) doStartContainer(bg context.Context, c t.Container, c name := c.Name() log.Debugf("Starting container %s (%s)", name, t.ContainerID(creation.ID).ShortID()) - err := client.api.ContainerStart(bg, creation.ID, types.ContainerStartOptions{}) + err := client.api.ContainerStart(bg, creation.ID, container.StartOptions{}) if err != nil { return err } @@ -332,7 +345,7 @@ func (client dockerClient) HasNewImage(ctx context.Context, container t.Containe currentImageID := t.ImageID(container.ContainerInfo().ContainerJSONBase.Image) imageName := container.ImageName() - newImageInfo, _, err := client.api.ImageInspectWithRaw(ctx, imageName) + newImageInfo, err := client.api.ImageInspect(ctx, imageName) if err != nil { return false, currentImageID, err } @@ -343,7 +356,13 @@ func (client dockerClient) HasNewImage(ctx context.Context, container t.Containe return false, currentImageID, nil } - log.Infof("Found new %s image (%s)", imageName, newImageID.ShortID()) + imageID := newImageID.ShortID() + openImageVer, ok := newImageInfo.Config.Labels[openContainerVersion] + if ok { + imageID = fmt.Sprintf("%s - %s", imageID, openImageVer) + } + + log.Infof("Found new %s image (%s)", imageName, imageID) return true, newImageID, nil } @@ -411,7 +430,7 @@ func (client dockerClient) RemoveImageByID(id t.ImageID) error { items, err := client.api.ImageRemove( context.Background(), string(id), - types.ImageRemoveOptions{ + image.RemoveOptions{ Force: true, }) @@ -444,7 +463,7 @@ func (client dockerClient) ExecuteCommand(containerID t.ContainerID, command str clog := log.WithField("containerID", containerID) // Create the exec - execConfig := types.ExecConfig{ + execConfig := container.ExecOptions{ Tty: true, Detach: false, Cmd: []string{"sh", "-c", command}, @@ -455,7 +474,7 @@ func (client dockerClient) ExecuteCommand(containerID t.ContainerID, command str return false, err } - response, attachErr := client.api.ContainerExecAttach(bg, exec.ID, types.ExecStartCheck{ + response, attachErr := client.api.ContainerExecAttach(bg, exec.ID, container.ExecStartOptions{ Tty: true, Detach: false, }) @@ -464,7 +483,7 @@ func (client dockerClient) ExecuteCommand(containerID t.ContainerID, command str } // Run the exec - execStartCheck := types.ExecStartCheck{Detach: false, Tty: true} + execStartCheck := container.ExecStartOptions{Detach: false, Tty: true} err = client.api.ContainerExecStart(bg, exec.ID, execStartCheck) if err != nil { return false, err diff --git a/pkg/container/client_test.go b/pkg/container/client_test.go index 4e75409..67a6ed9 100644 --- a/pkg/container/client_test.go +++ b/pkg/container/client_test.go @@ -1,23 +1,24 @@ package container import ( - "github.com/docker/docker/api/types/network" "time" - "github.com/containrrr/watchtower/internal/util" - "github.com/containrrr/watchtower/pkg/container/mocks" - "github.com/containrrr/watchtower/pkg/filters" - t "github.com/containrrr/watchtower/pkg/types" + "github.com/docker/docker/api/types/network" + + "github.com/beatkind/watchtower/internal/util" + "github.com/beatkind/watchtower/pkg/container/mocks" + "github.com/beatkind/watchtower/pkg/filters" + t "github.com/beatkind/watchtower/pkg/types" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/backend" + dockerContainer "github.com/docker/docker/api/types/container" cli "github.com/docker/docker/client" "github.com/docker/docker/errdefs" "github.com/onsi/gomega/gbytes" "github.com/onsi/gomega/ghttp" "github.com/sirupsen/logrus" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" gt "github.com/onsi/gomega/types" @@ -78,8 +79,8 @@ var _ = Describe("the client", func() { When("removing a running container", func() { When("the container still exist after stopping", func() { It("should attempt to remove the container", func() { - container := MockContainer(WithContainerState(types.ContainerState{Running: true})) - containerStopped := MockContainer(WithContainerState(types.ContainerState{Running: false})) + container := MockContainer(WithContainerState(dockerContainer.State{Running: true})) + containerStopped := MockContainer(WithContainerState(dockerContainer.State{Running: false})) cid := container.ContainerInfo().ID mockServer.AppendHandlers( @@ -94,7 +95,7 @@ var _ = Describe("the client", func() { }) When("the container does not exist after stopping", func() { It("should not cause an error", func() { - container := MockContainer(WithContainerState(types.ContainerState{Running: true})) + container := MockContainer(WithContainerState(dockerContainer.State{Running: true})) cid := container.ContainerInfo().ID mockServer.AppendHandlers( @@ -270,7 +271,7 @@ var _ = Describe("the client", func() { // API.ContainerExecCreate ghttp.CombineHandlers( ghttp.VerifyRequest("POST", HaveSuffix("containers/%v/exec", containerID)), - ghttp.VerifyJSONRepresenting(types.ExecConfig{ + ghttp.VerifyJSONRepresenting(dockerContainer.ExecOptions{ User: user, Detach: false, Tty: true, @@ -280,12 +281,12 @@ var _ = Describe("the client", func() { cmd, }, }), - ghttp.RespondWithJSONEncoded(http.StatusOK, types.IDResponse{ID: execID}), + ghttp.RespondWithJSONEncoded(http.StatusOK, dockerContainer.CommitResponse{ID: execID}), ), // API.ContainerExecStart ghttp.CombineHandlers( ghttp.VerifyRequest("POST", HaveSuffix("exec/%v/start", execID)), - ghttp.VerifyJSONRepresenting(types.ExecStartCheck{ + ghttp.VerifyJSONRepresenting(dockerContainer.ExecStartOptions{ Detach: false, Tty: true, }), @@ -329,7 +330,7 @@ var _ = Describe("the client", func() { endpoints := map[string]*network.EndpointSettings{ `test`: {Aliases: aliases}, } - container.containerInfo.NetworkSettings = &types.NetworkSettings{Networks: endpoints} + container.containerInfo.NetworkSettings = &dockerContainer.NetworkSettings{Networks: endpoints} Expect(container.ContainerInfo().NetworkSettings.Networks[`test`].Aliases).To(Equal(aliases)) Expect(client.GetNetworkConfig(container).EndpointsConfig[`test`].Aliases).To(Equal([]string{"One", "Two", "Four"})) }) diff --git a/pkg/container/container.go b/pkg/container/container.go index 10ed677..3776905 100644 --- a/pkg/container/container.go +++ b/pkg/container/container.go @@ -7,18 +7,18 @@ import ( "strconv" "strings" - "github.com/containrrr/watchtower/internal/util" - wt "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/internal/util" + wt "github.com/beatkind/watchtower/pkg/types" "github.com/sirupsen/logrus" - "github.com/docker/docker/api/types" dockercontainer "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/image" "github.com/docker/go-connections/nat" ) // NewContainer returns a new Container instance instantiated with the // specified ContainerInfo and ImageInfo structs. -func NewContainer(containerInfo *types.ContainerJSON, imageInfo *types.ImageInspect) *Container { +func NewContainer(containerInfo *dockercontainer.InspectResponse, imageInfo *image.InspectResponse) *Container { return &Container{ containerInfo: containerInfo, imageInfo: imageInfo, @@ -30,8 +30,8 @@ type Container struct { LinkedToRestarting bool Stale bool - containerInfo *types.ContainerJSON - imageInfo *types.ImageInspect + containerInfo *dockercontainer.InspectResponse + imageInfo *image.InspectResponse } // IsLinkedToRestarting returns the current value of the LinkedToRestarting field for the container @@ -55,7 +55,7 @@ func (c *Container) SetStale(value bool) { } // ContainerInfo fetches JSON info for the container -func (c Container) ContainerInfo() *types.ContainerJSON { +func (c Container) ContainerInfo() *dockercontainer.InspectResponse { return c.containerInfo } @@ -368,7 +368,7 @@ func (c Container) HasImageInfo() bool { } // ImageInfo fetches the ImageInspect data of the current container -func (c Container) ImageInfo() *types.ImageInspect { +func (c Container) ImageInfo() *image.InspectResponse { return c.imageInfo } diff --git a/pkg/container/container_mock_test.go b/pkg/container/container_mock_test.go index 8aa1470..04641fd 100644 --- a/pkg/container/container_mock_test.go +++ b/pkg/container/container_mock_test.go @@ -1,16 +1,16 @@ package container import ( - "github.com/docker/docker/api/types" dockerContainer "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/image" "github.com/docker/go-connections/nat" ) -type MockContainerUpdate func(*types.ContainerJSON, *types.ImageInspect) +type MockContainerUpdate func(*dockerContainer.InspectResponse, *image.InspectResponse) func MockContainer(updates ...MockContainerUpdate) *Container { - containerInfo := types.ContainerJSON{ - ContainerJSONBase: &types.ContainerJSONBase{ + containerInfo := dockerContainer.InspectResponse{ + ContainerJSONBase: &dockerContainer.ContainerJSONBase{ ID: "container_id", Image: "image", Name: "test-containrrr", @@ -20,7 +20,7 @@ func MockContainer(updates ...MockContainerUpdate) *Container { Labels: map[string]string{}, }, } - image := types.ImageInspect{ + image := image.InspectResponse{ ID: "image_id", Config: &dockerContainer.Config{}, } @@ -32,7 +32,7 @@ func MockContainer(updates ...MockContainerUpdate) *Container { } func WithPortBindings(portBindingSources ...string) MockContainerUpdate { - return func(c *types.ContainerJSON, i *types.ImageInspect) { + return func(c *dockerContainer.InspectResponse, i *image.InspectResponse) { portBindings := nat.PortMap{} for _, pbs := range portBindingSources { portBindings[nat.Port(pbs)] = []nat.PortBinding{} @@ -42,38 +42,38 @@ func WithPortBindings(portBindingSources ...string) MockContainerUpdate { } func WithImageName(name string) MockContainerUpdate { - return func(c *types.ContainerJSON, i *types.ImageInspect) { + return func(c *dockerContainer.InspectResponse, i *image.InspectResponse) { c.Config.Image = name i.RepoTags = append(i.RepoTags, name) } } func WithLinks(links []string) MockContainerUpdate { - return func(c *types.ContainerJSON, i *types.ImageInspect) { + return func(c *dockerContainer.InspectResponse, i *image.InspectResponse) { c.HostConfig.Links = links } } func WithLabels(labels map[string]string) MockContainerUpdate { - return func(c *types.ContainerJSON, i *types.ImageInspect) { + return func(c *dockerContainer.InspectResponse, i *image.InspectResponse) { c.Config.Labels = labels } } -func WithContainerState(state types.ContainerState) MockContainerUpdate { - return func(cnt *types.ContainerJSON, img *types.ImageInspect) { +func WithContainerState(state dockerContainer.State) MockContainerUpdate { + return func(cnt *dockerContainer.InspectResponse, img *image.InspectResponse) { cnt.State = &state } } func WithHealthcheck(healthConfig dockerContainer.HealthConfig) MockContainerUpdate { - return func(cnt *types.ContainerJSON, img *types.ImageInspect) { + return func(cnt *dockerContainer.InspectResponse, img *image.InspectResponse) { cnt.Config.Healthcheck = &healthConfig } } func WithImageHealthcheck(healthConfig dockerContainer.HealthConfig) MockContainerUpdate { - return func(cnt *types.ContainerJSON, img *types.ImageInspect) { + return func(cnt *dockerContainer.InspectResponse, img *image.InspectResponse) { img.Config.Healthcheck = &healthConfig } } diff --git a/pkg/container/container_suite_test.go b/pkg/container/container_suite_test.go index 292a008..9f08f1f 100644 --- a/pkg/container/container_suite_test.go +++ b/pkg/container/container_suite_test.go @@ -3,7 +3,7 @@ package container_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/container/container_test.go b/pkg/container/container_test.go index a129afe..489cd07 100644 --- a/pkg/container/container_test.go +++ b/pkg/container/container_test.go @@ -1,10 +1,10 @@ package container import ( - "github.com/containrrr/watchtower/pkg/types" - dc "github.com/docker/docker/api/types/container" + "github.com/beatkind/watchtower/pkg/types" + dockerContainer "github.com/docker/docker/api/types/container" "github.com/docker/go-connections/nat" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -71,51 +71,51 @@ var _ = Describe("the container", func() { Describe("GetCreateConfig", func() { When("container healthcheck config is equal to image config", func() { It("should return empty healthcheck values", func() { - c := MockContainer(WithHealthcheck(dc.HealthConfig{ + c := MockContainer(WithHealthcheck(dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "1s"}, - }), WithImageHealthcheck(dc.HealthConfig{ + }), WithImageHealthcheck(dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "1s"}, })) - Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dc.HealthConfig{})) + Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dockerContainer.HealthConfig{})) - c = MockContainer(WithHealthcheck(dc.HealthConfig{ + c = MockContainer(WithHealthcheck(dockerContainer.HealthConfig{ Timeout: 30, - }), WithImageHealthcheck(dc.HealthConfig{ + }), WithImageHealthcheck(dockerContainer.HealthConfig{ Timeout: 30, })) - Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dc.HealthConfig{})) + Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dockerContainer.HealthConfig{})) - c = MockContainer(WithHealthcheck(dc.HealthConfig{ + c = MockContainer(WithHealthcheck(dockerContainer.HealthConfig{ StartPeriod: 30, - }), WithImageHealthcheck(dc.HealthConfig{ + }), WithImageHealthcheck(dockerContainer.HealthConfig{ StartPeriod: 30, })) - Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dc.HealthConfig{})) + Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dockerContainer.HealthConfig{})) - c = MockContainer(WithHealthcheck(dc.HealthConfig{ + c = MockContainer(WithHealthcheck(dockerContainer.HealthConfig{ Retries: 30, - }), WithImageHealthcheck(dc.HealthConfig{ + }), WithImageHealthcheck(dockerContainer.HealthConfig{ Retries: 30, })) - Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dc.HealthConfig{})) + Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dockerContainer.HealthConfig{})) }) }) When("container healthcheck config is different to image config", func() { It("should return the container healthcheck values", func() { - c := MockContainer(WithHealthcheck(dc.HealthConfig{ + c := MockContainer(WithHealthcheck(dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "1s"}, Interval: 30, Timeout: 30, StartPeriod: 10, Retries: 2, - }), WithImageHealthcheck(dc.HealthConfig{ + }), WithImageHealthcheck(dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "10s"}, Interval: 10, Timeout: 60, StartPeriod: 30, Retries: 10, })) - Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dc.HealthConfig{ + Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "1s"}, Interval: 30, Timeout: 30, @@ -126,7 +126,7 @@ var _ = Describe("the container", func() { }) When("container healthcheck config is empty", func() { It("should not panic", func() { - c := MockContainer(WithImageHealthcheck(dc.HealthConfig{ + c := MockContainer(WithImageHealthcheck(dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "10s"}, Interval: 10, Timeout: 60, @@ -138,14 +138,14 @@ var _ = Describe("the container", func() { }) When("container image healthcheck config is empty", func() { It("should not panic", func() { - c := MockContainer(WithHealthcheck(dc.HealthConfig{ + c := MockContainer(WithHealthcheck(dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "1s"}, Interval: 30, Timeout: 30, StartPeriod: 10, Retries: 2, })) - Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dc.HealthConfig{ + Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dockerContainer.HealthConfig{ Test: []string{"/usr/bin/sleep", "1s"}, Interval: 30, Timeout: 30, diff --git a/pkg/container/mocks/ApiServer.go b/pkg/container/mocks/ApiServer.go index 84756f0..a6b4489 100644 --- a/pkg/container/mocks/ApiServer.go +++ b/pkg/container/mocks/ApiServer.go @@ -3,17 +3,19 @@ package mocks import ( "encoding/json" "fmt" - "github.com/onsi/ginkgo" "net/http" "net/url" "os" "path/filepath" "strings" - t "github.com/containrrr/watchtower/pkg/types" + "github.com/onsi/ginkgo/v2" - "github.com/docker/docker/api/types" + t "github.com/beatkind/watchtower/pkg/types" + + dockerContainer "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" + dockerImage "github.com/docker/docker/api/types/image" O "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) @@ -165,7 +167,7 @@ func getContainerHandler(containerId string, responseHandler http.HandlerFunc) h } // GetContainerHandler mocks the GET containers/{id}/json endpoint -func GetContainerHandler(containerID string, containerInfo *types.ContainerJSON) http.HandlerFunc { +func GetContainerHandler(containerID string, containerInfo *dockerContainer.InspectResponse) http.HandlerFunc { responseHandler := containerNotFoundResponse(containerID) if containerInfo != nil { responseHandler = ghttp.RespondWithJSONEncoded(http.StatusOK, containerInfo) @@ -174,7 +176,7 @@ func GetContainerHandler(containerID string, containerInfo *types.ContainerJSON) } // GetImageHandler mocks the GET images/{id}/json endpoint -func GetImageHandler(imageInfo *types.ImageInspect) http.HandlerFunc { +func GetImageHandler(imageInfo *dockerImage.InspectResponse) http.HandlerFunc { return getImageHandler(t.ImageID(imageInfo.ID), ghttp.RespondWithJSONEncoded(http.StatusOK, imageInfo)) } @@ -195,8 +197,8 @@ func ListContainersHandler(statuses ...string) http.HandlerFunc { func respondWithFilteredContainers(filters filters.Args) http.HandlerFunc { containersJSON, err := getMockJSONFile("./mocks/data/containers.json") O.ExpectWithOffset(2, err).ShouldNot(O.HaveOccurred()) - var filteredContainers []types.Container - var containers []types.Container + var filteredContainers []dockerContainer.Summary + var containers []dockerContainer.Summary O.ExpectWithOffset(2, json.Unmarshal(containersJSON, &containers)).To(O.Succeed()) for _, v := range containers { for _, key := range filters.Get("status") { @@ -262,12 +264,12 @@ func RemoveImageHandler(imagesWithParents map[string][]string) http.HandlerFunc image := parts[len(parts)-1] if parents, found := imagesWithParents[image]; found { - items := []types.ImageDeleteResponseItem{ + items := []dockerImage.DeleteResponse{ {Untagged: image}, {Deleted: image}, } for _, parent := range parents { - items = append(items, types.ImageDeleteResponseItem{Deleted: parent}) + items = append(items, dockerImage.DeleteResponse{Deleted: parent}) } ghttp.RespondWithJSONEncoded(http.StatusOK, items)(w, r) } else { diff --git a/pkg/container/mocks/container_ref.go b/pkg/container/mocks/container_ref.go index c46eb93..7826880 100644 --- a/pkg/container/mocks/container_ref.go +++ b/pkg/container/mocks/container_ref.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - t "github.com/containrrr/watchtower/pkg/types" + t "github.com/beatkind/watchtower/pkg/types" ) type imageRef struct { diff --git a/pkg/container/util_test.go b/pkg/container/util_test.go index 00912ba..cc982c6 100644 --- a/pkg/container/util_test.go +++ b/pkg/container/util_test.go @@ -1,8 +1,8 @@ package container_test import ( - wt "github.com/containrrr/watchtower/pkg/types" - . "github.com/onsi/ginkgo" + wt "github.com/beatkind/watchtower/pkg/types" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/filters/filters.go b/pkg/filters/filters.go index 4fa0bcd..b674790 100644 --- a/pkg/filters/filters.go +++ b/pkg/filters/filters.go @@ -4,7 +4,7 @@ import ( "regexp" "strings" - t "github.com/containrrr/watchtower/pkg/types" + t "github.com/beatkind/watchtower/pkg/types" ) // WatchtowerContainersFilter filters only watchtower containers diff --git a/pkg/filters/filters_test.go b/pkg/filters/filters_test.go index 2b5cb5e..400bfc2 100644 --- a/pkg/filters/filters_test.go +++ b/pkg/filters/filters_test.go @@ -3,7 +3,7 @@ package filters import ( "testing" - "github.com/containrrr/watchtower/pkg/container/mocks" + "github.com/beatkind/watchtower/pkg/container/mocks" "github.com/stretchr/testify/assert" ) diff --git a/pkg/lifecycle/lifecycle.go b/pkg/lifecycle/lifecycle.go index c0f962e..17c0328 100644 --- a/pkg/lifecycle/lifecycle.go +++ b/pkg/lifecycle/lifecycle.go @@ -1,8 +1,8 @@ package lifecycle import ( - "github.com/containrrr/watchtower/pkg/container" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/container" + "github.com/beatkind/watchtower/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index b681733..19ba882 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -1,7 +1,7 @@ package metrics import ( - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/types" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" ) diff --git a/pkg/notifications/email.go b/pkg/notifications/email.go index 9103d38..40a6ca9 100644 --- a/pkg/notifications/email.go +++ b/pkg/notifications/email.go @@ -5,8 +5,8 @@ import ( "github.com/spf13/cobra" + t "github.com/beatkind/watchtower/pkg/types" shoutrrrSmtp "github.com/containrrr/shoutrrr/pkg/services/smtp" - t "github.com/containrrr/watchtower/pkg/types" log "github.com/sirupsen/logrus" ) @@ -15,7 +15,7 @@ const ( ) type emailTypeNotifier struct { - From, To string + From, FromName, To string Server, User, Password string Port int tlsSkipVerify bool @@ -27,6 +27,7 @@ func newEmailNotifier(c *cobra.Command) t.ConvertibleNotifier { flags := c.Flags() from, _ := flags.GetString("notification-email-from") + fromName, _ := flags.GetString("notification-email-from-name") to, _ := flags.GetString("notification-email-to") server, _ := flags.GetString("notification-email-server") user, _ := flags.GetString("notification-email-server-user") @@ -38,6 +39,7 @@ func newEmailNotifier(c *cobra.Command) t.ConvertibleNotifier { n := &emailTypeNotifier{ entries: []*log.Entry{}, From: from, + FromName: fromName, To: to, Server: server, User: user, @@ -53,7 +55,7 @@ func newEmailNotifier(c *cobra.Command) t.ConvertibleNotifier { func (e *emailTypeNotifier) GetURL(c *cobra.Command) (string, error) { conf := &shoutrrrSmtp.Config{ FromAddress: e.From, - FromName: "Watchtower", + FromName: e.FromName, ToAddresses: []string{e.To}, Port: uint16(e.Port), Host: e.Server, diff --git a/pkg/notifications/gotify.go b/pkg/notifications/gotify.go index c36eb4b..ea7d84a 100644 --- a/pkg/notifications/gotify.go +++ b/pkg/notifications/gotify.go @@ -4,8 +4,8 @@ import ( "net/url" "strings" + t "github.com/beatkind/watchtower/pkg/types" shoutrrrGotify "github.com/containrrr/shoutrrr/pkg/services/gotify" - t "github.com/containrrr/watchtower/pkg/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/pkg/notifications/json.go b/pkg/notifications/json.go index 20da92b..43a8247 100644 --- a/pkg/notifications/json.go +++ b/pkg/notifications/json.go @@ -3,7 +3,7 @@ package notifications import ( "encoding/json" - t "github.com/containrrr/watchtower/pkg/types" + t "github.com/beatkind/watchtower/pkg/types" ) type jsonMap = map[string]interface{} diff --git a/pkg/notifications/json_test.go b/pkg/notifications/json_test.go index ef30c59..a31dd5b 100644 --- a/pkg/notifications/json_test.go +++ b/pkg/notifications/json_test.go @@ -1,8 +1,8 @@ package notifications import ( - s "github.com/containrrr/watchtower/pkg/session" - . "github.com/onsi/ginkgo" + s "github.com/beatkind/watchtower/pkg/session" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/notifications/model.go b/pkg/notifications/model.go index 83c97ba..37ccac4 100644 --- a/pkg/notifications/model.go +++ b/pkg/notifications/model.go @@ -1,7 +1,7 @@ package notifications import ( - t "github.com/containrrr/watchtower/pkg/types" + t "github.com/beatkind/watchtower/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/notifications/msteams.go b/pkg/notifications/msteams.go index cfca30e..6e8460e 100644 --- a/pkg/notifications/msteams.go +++ b/pkg/notifications/msteams.go @@ -3,8 +3,8 @@ package notifications import ( "net/url" + t "github.com/beatkind/watchtower/pkg/types" shoutrrrTeams "github.com/containrrr/shoutrrr/pkg/services/teams" - t "github.com/containrrr/watchtower/pkg/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/pkg/notifications/notifications_suite_test.go b/pkg/notifications/notifications_suite_test.go index 19d286e..a38d62d 100644 --- a/pkg/notifications/notifications_suite_test.go +++ b/pkg/notifications/notifications_suite_test.go @@ -1,10 +1,11 @@ package notifications_test import ( - "github.com/onsi/gomega/format" "testing" - . "github.com/onsi/ginkgo" + "github.com/onsi/gomega/format" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/notifications/notifier.go b/pkg/notifications/notifier.go index ff7b6b5..62e819b 100644 --- a/pkg/notifications/notifier.go +++ b/pkg/notifications/notifier.go @@ -5,7 +5,7 @@ import ( "strings" "time" - ty "github.com/containrrr/watchtower/pkg/types" + ty "github.com/beatkind/watchtower/pkg/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/pkg/notifications/notifier_test.go b/pkg/notifications/notifier_test.go index 96d513c..929ea21 100644 --- a/pkg/notifications/notifier_test.go +++ b/pkg/notifications/notifier_test.go @@ -5,10 +5,10 @@ import ( "net/url" "time" - "github.com/containrrr/watchtower/cmd" - "github.com/containrrr/watchtower/internal/flags" - "github.com/containrrr/watchtower/pkg/notifications" - . "github.com/onsi/ginkgo" + "github.com/beatkind/watchtower/cmd" + "github.com/beatkind/watchtower/internal/flags" + "github.com/beatkind/watchtower/pkg/notifications" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -308,6 +308,8 @@ var _ = Describe("notifications", func() { "email", "--notification-email-from", fromAddress, + "--notification-email-from-name", + "Watchtower1", "--notification-email-to", "mail@example.com", "--notification-email-server-user", @@ -334,6 +336,8 @@ var _ = Describe("notifications", func() { "email", "--notification-email-from", fromAddress, + "--notification-email-from-name", + "Watchtower1", "--notification-email-to", toAddress, "--notification-email-server-user", @@ -342,7 +346,7 @@ var _ = Describe("notifications", func() { "secret-password", "--notification-email-server", "mail.containrrr.dev", - "--notification-email-delay", + "--notifications-delay", fmt.Sprint(expectedDelay.Seconds()), } @@ -353,7 +357,7 @@ var _ = Describe("notifications", func() { }) func buildExpectedURL(username string, password string, host string, port int, from string, to string, auth string) string { - var template = "smtp://%s:%s@%s:%d/?auth=%s&fromaddress=%s&fromname=Watchtower&subject=&toaddresses=%s" + var template = "smtp://%s:%s@%s:%d/?auth=%s&fromaddress=%s&fromname=Watchtower1&subject=&toaddresses=%s" return fmt.Sprintf(template, url.QueryEscape(username), url.QueryEscape(password), diff --git a/pkg/notifications/preview/data/data.go b/pkg/notifications/preview/data/data.go index 4a002ed..ac82af3 100644 --- a/pkg/notifications/preview/data/data.go +++ b/pkg/notifications/preview/data/data.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/types" ) type previewData struct { diff --git a/pkg/notifications/preview/data/report.go b/pkg/notifications/preview/data/report.go index 2c8627f..e342bfd 100644 --- a/pkg/notifications/preview/data/report.go +++ b/pkg/notifications/preview/data/report.go @@ -3,7 +3,7 @@ package data import ( "sort" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/types" ) // State is the outcome of a container in a session report diff --git a/pkg/notifications/preview/data/status.go b/pkg/notifications/preview/data/status.go index 33f9bec..7603452 100644 --- a/pkg/notifications/preview/data/status.go +++ b/pkg/notifications/preview/data/status.go @@ -1,6 +1,6 @@ package data -import wt "github.com/containrrr/watchtower/pkg/types" +import wt "github.com/beatkind/watchtower/pkg/types" type containerStatus struct { containerID wt.ContainerID diff --git a/pkg/notifications/preview/tplprev.go b/pkg/notifications/preview/tplprev.go index 8855416..9911cfb 100644 --- a/pkg/notifications/preview/tplprev.go +++ b/pkg/notifications/preview/tplprev.go @@ -5,8 +5,8 @@ import ( "strings" "text/template" - "github.com/containrrr/watchtower/pkg/notifications/preview/data" - "github.com/containrrr/watchtower/pkg/notifications/templates" + "github.com/beatkind/watchtower/pkg/notifications/preview/data" + "github.com/beatkind/watchtower/pkg/notifications/templates" ) func Render(input string, states []data.State, loglevels []data.LogLevel) (string, error) { diff --git a/pkg/notifications/shoutrrr.go b/pkg/notifications/shoutrrr.go index cc3a931..ad9bdb0 100644 --- a/pkg/notifications/shoutrrr.go +++ b/pkg/notifications/shoutrrr.go @@ -8,10 +8,10 @@ import ( "text/template" "time" + "github.com/beatkind/watchtower/pkg/notifications/templates" + t "github.com/beatkind/watchtower/pkg/types" "github.com/containrrr/shoutrrr" "github.com/containrrr/shoutrrr/pkg/types" - "github.com/containrrr/watchtower/pkg/notifications/templates" - t "github.com/containrrr/watchtower/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/notifications/shoutrrr_test.go b/pkg/notifications/shoutrrr_test.go index 703958b..c279b37 100644 --- a/pkg/notifications/shoutrrr_test.go +++ b/pkg/notifications/shoutrrr_test.go @@ -3,11 +3,11 @@ package notifications import ( "time" + "github.com/beatkind/watchtower/internal/actions/mocks" + "github.com/beatkind/watchtower/internal/flags" + s "github.com/beatkind/watchtower/pkg/session" "github.com/containrrr/shoutrrr/pkg/types" - "github.com/containrrr/watchtower/internal/actions/mocks" - "github.com/containrrr/watchtower/internal/flags" - s "github.com/containrrr/watchtower/pkg/session" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" "github.com/sirupsen/logrus" diff --git a/pkg/notifications/slack.go b/pkg/notifications/slack.go index 9118527..ad5384b 100644 --- a/pkg/notifications/slack.go +++ b/pkg/notifications/slack.go @@ -3,9 +3,9 @@ package notifications import ( "strings" + t "github.com/beatkind/watchtower/pkg/types" shoutrrrDisco "github.com/containrrr/shoutrrr/pkg/services/discord" shoutrrrSlack "github.com/containrrr/shoutrrr/pkg/services/slack" - t "github.com/containrrr/watchtower/pkg/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/pkg/registry/auth/auth.go b/pkg/registry/auth/auth.go index 99b05c9..242cc22 100644 --- a/pkg/registry/auth/auth.go +++ b/pkg/registry/auth/auth.go @@ -9,8 +9,8 @@ import ( "net/url" "strings" - "github.com/containrrr/watchtower/pkg/registry/helpers" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/registry/helpers" + "github.com/beatkind/watchtower/pkg/types" ref "github.com/distribution/reference" "github.com/sirupsen/logrus" ) diff --git a/pkg/registry/auth/auth_test.go b/pkg/registry/auth/auth_test.go index d295310..50ca261 100644 --- a/pkg/registry/auth/auth_test.go +++ b/pkg/registry/auth/auth_test.go @@ -8,12 +8,12 @@ import ( "testing" "time" - "github.com/containrrr/watchtower/internal/actions/mocks" - "github.com/containrrr/watchtower/pkg/registry/auth" + "github.com/beatkind/watchtower/internal/actions/mocks" + "github.com/beatkind/watchtower/pkg/registry/auth" - wtTypes "github.com/containrrr/watchtower/pkg/types" + wtTypes "github.com/beatkind/watchtower/pkg/types" ref "github.com/distribution/reference" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/registry/digest/digest.go b/pkg/registry/digest/digest.go index e569599..8c5963b 100644 --- a/pkg/registry/digest/digest.go +++ b/pkg/registry/digest/digest.go @@ -11,10 +11,10 @@ import ( "strings" "time" - "github.com/containrrr/watchtower/internal/meta" - "github.com/containrrr/watchtower/pkg/registry/auth" - "github.com/containrrr/watchtower/pkg/registry/manifest" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/internal/meta" + "github.com/beatkind/watchtower/pkg/registry/auth" + "github.com/beatkind/watchtower/pkg/registry/manifest" + "github.com/beatkind/watchtower/pkg/types" "github.com/sirupsen/logrus" ) diff --git a/pkg/registry/digest/digest_test.go b/pkg/registry/digest/digest_test.go index a6e6650..fb07e79 100644 --- a/pkg/registry/digest/digest_test.go +++ b/pkg/registry/digest/digest_test.go @@ -2,16 +2,17 @@ package digest_test import ( "fmt" - "github.com/containrrr/watchtower/internal/actions/mocks" - "github.com/containrrr/watchtower/pkg/registry/digest" - wtTypes "github.com/containrrr/watchtower/pkg/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/ghttp" "net/http" "os" "testing" "time" + + "github.com/beatkind/watchtower/internal/actions/mocks" + "github.com/beatkind/watchtower/pkg/registry/digest" + wtTypes "github.com/beatkind/watchtower/pkg/types" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "github.com/onsi/gomega/ghttp" ) func TestDigest(t *testing.T) { diff --git a/pkg/registry/helpers/helpers_test.go b/pkg/registry/helpers/helpers_test.go index a561c2c..d39b2a1 100644 --- a/pkg/registry/helpers/helpers_test.go +++ b/pkg/registry/helpers/helpers_test.go @@ -3,7 +3,7 @@ package helpers import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -31,7 +31,7 @@ var _ = Describe("the helpers", func() { Expect(GetRegistryAddress("localhost/watchtower")).To(Equal("localhost")) }) It("should return the server address if passed a fully qualified image name", func() { - Expect(GetRegistryAddress("github.com/containrrr/config")).To(Equal("github.com")) + Expect(GetRegistryAddress("github.com/beatkind/config")).To(Equal("github.com")) }) }) }) diff --git a/pkg/registry/manifest/manifest.go b/pkg/registry/manifest/manifest.go index c732bae..119b0b7 100644 --- a/pkg/registry/manifest/manifest.go +++ b/pkg/registry/manifest/manifest.go @@ -5,8 +5,8 @@ import ( "fmt" url2 "net/url" - "github.com/containrrr/watchtower/pkg/registry/helpers" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/registry/helpers" + "github.com/beatkind/watchtower/pkg/types" ref "github.com/distribution/reference" "github.com/sirupsen/logrus" ) diff --git a/pkg/registry/manifest/manifest_test.go b/pkg/registry/manifest/manifest_test.go index b24d9bc..82ece1d 100644 --- a/pkg/registry/manifest/manifest_test.go +++ b/pkg/registry/manifest/manifest_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "github.com/containrrr/watchtower/internal/actions/mocks" - "github.com/containrrr/watchtower/pkg/registry/manifest" - apiTypes "github.com/docker/docker/api/types" - . "github.com/onsi/ginkgo" + "github.com/beatkind/watchtower/internal/actions/mocks" + "github.com/beatkind/watchtower/pkg/registry/manifest" + "github.com/docker/docker/api/types/image" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -60,7 +60,7 @@ var _ = Describe("the manifest module", func() { }) func buildMockContainerManifestURL(imageRef string) (string, error) { - imageInfo := apiTypes.ImageInspect{ + imageInfo := image.InspectResponse{ RepoTags: []string{ imageRef, }, diff --git a/pkg/registry/registry.go b/pkg/registry/registry.go index 430b401..7fdad4a 100644 --- a/pkg/registry/registry.go +++ b/pkg/registry/registry.go @@ -1,42 +1,34 @@ package registry import ( - "github.com/containrrr/watchtower/pkg/registry/helpers" - watchtowerTypes "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/registry/helpers" + watchtowerTypes "github.com/beatkind/watchtower/pkg/types" ref "github.com/distribution/reference" - "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/image" log "github.com/sirupsen/logrus" ) // GetPullOptions creates a struct with all options needed for pulling images from a registry -func GetPullOptions(imageName string) (types.ImagePullOptions, error) { +func GetPullOptions(imageName string) (image.PullOptions, error) { auth, err := EncodedAuth(imageName) log.Debugf("Got image name: %s", imageName) if err != nil { - return types.ImagePullOptions{}, err + return image.PullOptions{}, err } if auth == "" { - return types.ImagePullOptions{}, nil + return image.PullOptions{}, nil } // CREDENTIAL: Uncomment to log docker config auth // log.Tracef("Got auth value: %s", auth) - return types.ImagePullOptions{ + return image.PullOptions{ RegistryAuth: auth, - PrivilegeFunc: DefaultAuthHandler, + // PrivilegeFunc: DefaultAuthHandler, }, nil } -// DefaultAuthHandler will be invoked if an AuthConfig is rejected -// It could be used to return a new value for the "X-Registry-Auth" authentication header, -// but there's no point trying again with the same value as used in AuthConfig -func DefaultAuthHandler() (string, error) { - log.Debug("Authentication request was rejected. Trying again without authentication") - return "", nil -} - // WarnOnAPIConsumption will return true if the registry is known-expected // to respond well to HTTP HEAD in checking the container digest -- or if there // are problems parsing the container hostname. diff --git a/pkg/registry/registry_suite_test.go b/pkg/registry/registry_suite_test.go index 4dcbea6..f316b50 100644 --- a/pkg/registry/registry_suite_test.go +++ b/pkg/registry/registry_suite_test.go @@ -1,10 +1,11 @@ package registry_test import ( - "github.com/sirupsen/logrus" "testing" - . "github.com/onsi/ginkgo" + "github.com/sirupsen/logrus" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/registry/registry_test.go b/pkg/registry/registry_test.go index 481c91d..1513e1e 100644 --- a/pkg/registry/registry_test.go +++ b/pkg/registry/registry_test.go @@ -1,9 +1,9 @@ package registry_test import ( - "github.com/containrrr/watchtower/internal/actions/mocks" - unit "github.com/containrrr/watchtower/pkg/registry" - . "github.com/onsi/ginkgo" + "github.com/beatkind/watchtower/internal/actions/mocks" + unit "github.com/beatkind/watchtower/pkg/registry" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "time" diff --git a/pkg/registry/trust.go b/pkg/registry/trust.go index 0b20248..86ebf68 100644 --- a/pkg/registry/trust.go +++ b/pkg/registry/trust.go @@ -6,7 +6,7 @@ import ( "errors" "os" - "github.com/containrrr/watchtower/pkg/registry/helpers" + "github.com/beatkind/watchtower/pkg/registry/helpers" cliconfig "github.com/docker/cli/cli/config" "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/cli/config/credentials" @@ -36,7 +36,7 @@ func EncodedEnvAuth() (string, error) { Username: username, Password: password, } - + log.Debugf("Loaded auth credentials for registry user %s from environment", auth.Username) // CREDENTIAL: Uncomment to log REPO_PASS environment variable // log.Tracef("Using auth password %s", auth.Password) diff --git a/pkg/registry/trust_test.go b/pkg/registry/trust_test.go index 00fc8a7..87d05f9 100644 --- a/pkg/registry/trust_test.go +++ b/pkg/registry/trust_test.go @@ -3,7 +3,7 @@ package registry import ( "os" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/session/container_status.go b/pkg/session/container_status.go index 8313da1..d7e6368 100644 --- a/pkg/session/container_status.go +++ b/pkg/session/container_status.go @@ -1,6 +1,6 @@ package session -import wt "github.com/containrrr/watchtower/pkg/types" +import wt "github.com/beatkind/watchtower/pkg/types" // State indicates what the current state is of the container type State int diff --git a/pkg/session/progress.go b/pkg/session/progress.go index 57069be..ca415c5 100644 --- a/pkg/session/progress.go +++ b/pkg/session/progress.go @@ -1,7 +1,7 @@ package session import ( - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/types" ) // Progress contains the current session container status diff --git a/pkg/session/report.go b/pkg/session/report.go index 707eb91..20d4acf 100644 --- a/pkg/session/report.go +++ b/pkg/session/report.go @@ -3,7 +3,7 @@ package session import ( "sort" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/types" ) type report struct { diff --git a/pkg/sorter/sort.go b/pkg/sorter/sort.go index b9d1e12..a365303 100644 --- a/pkg/sorter/sort.go +++ b/pkg/sorter/sort.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/containrrr/watchtower/pkg/types" + "github.com/beatkind/watchtower/pkg/types" ) // ByCreated allows a list of Container structs to be sorted by the container's diff --git a/pkg/types/container.go b/pkg/types/container.go index 8a22f44..3dbc71b 100644 --- a/pkg/types/container.go +++ b/pkg/types/container.go @@ -3,8 +3,8 @@ package types import ( "strings" - "github.com/docker/docker/api/types" - dc "github.com/docker/docker/api/types/container" + dockerContainer "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/image" ) // ImageID is a hash string representing a container image @@ -44,7 +44,7 @@ func shortID(longID string) string { // Container is a docker container running an image type Container interface { - ContainerInfo() *types.ContainerJSON + ContainerInfo() *dockerContainer.InspectResponse ID() ContainerID IsRunning() bool Name() string @@ -59,7 +59,7 @@ type Container interface { IsWatchtower() bool StopSignal() string HasImageInfo() bool - ImageInfo() *types.ImageInspect + ImageInfo() *image.InspectResponse GetLifecyclePreCheckCommand() string GetLifecyclePostCheckCommand() string GetLifecyclePreUpdateCommand() string @@ -73,6 +73,6 @@ type Container interface { PreUpdateTimeout() int PostUpdateTimeout() int IsRestarting() bool - GetCreateConfig() *dc.Config - GetCreateHostConfig() *dc.HostConfig + GetCreateConfig() *dockerContainer.Config + GetCreateHostConfig() *dockerContainer.HostConfig } diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..5db72dd --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] +} diff --git a/tplprev/main.go b/tplprev/main.go index 120f968..4a1d9a5 100644 --- a/tplprev/main.go +++ b/tplprev/main.go @@ -7,9 +7,9 @@ import ( "fmt" "os" - "github.com/containrrr/watchtower/internal/meta" - "github.com/containrrr/watchtower/pkg/notifications/preview" - "github.com/containrrr/watchtower/pkg/notifications/preview/data" + "github.com/beatkind/watchtower/internal/meta" + "github.com/beatkind/watchtower/pkg/notifications/preview" + "github.com/beatkind/watchtower/pkg/notifications/preview/data" ) func main() { diff --git a/tplprev/main_wasm.go b/tplprev/main_wasm.go index 5e2ce6a..a6ebc74 100644 --- a/tplprev/main_wasm.go +++ b/tplprev/main_wasm.go @@ -5,9 +5,9 @@ package main import ( "fmt" - "github.com/containrrr/watchtower/internal/meta" - "github.com/containrrr/watchtower/pkg/notifications/preview" - "github.com/containrrr/watchtower/pkg/notifications/preview/data" + "github.com/beatkind/watchtower/internal/meta" + "github.com/beatkind/watchtower/pkg/notifications/preview" + "github.com/beatkind/watchtower/pkg/notifications/preview/data" "syscall/js" )