From 7382727c74ed99b86ca803aa59d2017a7d881c77 Mon Sep 17 00:00:00 2001 From: Jan Rundshagen Date: Tue, 9 Jul 2024 09:00:00 +0200 Subject: [PATCH] chore: Update readme, add some hints, fix markdown --- .github/workflows/codeql-analysis.yaml | 72 -------------------------- .github/workflows/greetings.yaml | 23 -------- CONTRIBUTING.md | 26 +++++++--- README.md | 35 ++++++++----- SECURITY.md | 12 +---- code_of_conduct.md | 4 +- 6 files changed, 43 insertions(+), 129 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yaml delete mode 100644 .github/workflows/greetings.yaml diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml deleted file mode 100644 index c479d05..0000000 --- a/.github/workflows/codeql-analysis.yaml +++ /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/greetings.yaml b/.github/workflows/greetings.yaml deleted file mode 100644 index acb985f..0000000 --- a/.github/workflows/greetings.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# name: Greetings - -# on: -# # Runs in the context of the target (beatkind/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/beatkind/.github/blob/master/CODE_OF_CONDUCT.md) -# as well as our [contribution guidelines](https://github.com/beatkind/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/CONTRIBUTING.md b/CONTRIBUTING.md index 0202384..37f1b1e 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.22.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 +``` diff --git a/README.md b/README.md index 518ac8f..f0c0c53 100644 --- a/README.md +++ b/README.md @@ -1,17 +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. -

- - [![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) +[![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)
@@ -21,7 +29,7 @@ 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 \ @@ -31,4 +39,5 @@ $ docker run --detach \ 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://beatkind.dev/watchtower. + +The full documentation is available at . diff --git a/SECURITY.md b/SECURITY.md index 550f904..f217592 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/code_of_conduct.md b/code_of_conduct.md index ae04b6b..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/beatkind/.github/blob/master/CODE_OF_CONDUCT.md) +Nothing here yet. We'll figure it our, once it is at that point.