{"id":17358871,"url":"https://github.com/totodore/docker-ci","last_synced_at":"2025-07-11T10:39:14.780Z","repository":{"id":44999162,"uuid":"318329700","full_name":"Totodore/docker-ci","owner":"Totodore","description":"Docker-ci is a docker program which allows you to use easy continuous integration with the use of labels in you docker-compose files","archived":true,"fork":false,"pushed_at":"2022-01-25T23:19:13.000Z","size":454,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-04T13:57:42.094Z","etag":null,"topics":["ci","continuous-integration","deployment","docker","workflow"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/theodoreprevot/docker-ci","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Totodore.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-03T21:54:10.000Z","updated_at":"2025-06-07T23:01:11.000Z","dependencies_parsed_at":"2022-09-03T01:11:25.837Z","dependency_job_id":null,"html_url":"https://github.com/Totodore/docker-ci","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/Totodore/docker-ci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totodore%2Fdocker-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totodore%2Fdocker-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totodore%2Fdocker-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totodore%2Fdocker-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Totodore","download_url":"https://codeload.github.com/Totodore/docker-ci/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Totodore%2Fdocker-ci/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264786938,"owners_count":23663928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","continuous-integration","deployment","docker","workflow"],"created_at":"2024-10-15T19:07:21.815Z","updated_at":"2025-07-11T10:39:14.743Z","avatar_url":"https://github.com/Totodore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-CI\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FTotodore%2Fdocker-ci.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FTotodore%2Fdocker-ci?ref=badge_shield)\n\n\nDocker-CI is a little program which allow you to implement easy continuous integration using Github Container Registry or DockerHub. It uses labels to set the different options to enable Docker-ci for each container. \n\nDocker-CI watch for container creations, it means that you don't have to restart it whenever you update a container configuration.\n\nDocker-CI will then create a route corresponding to this pattern : ```http(s)://0.0.0.0[:port]/deploy/:appName``` where the appName correspond to the name you gave to your container or to the name you gave through the option ```docker-ci.name```\nYou can then set a Github Automation with an [Image building](https://github.com/actions/starter-workflows/blob/a571f2981ab5a22dfd9158f20646c2358db3654c/ci/docker-publish.yml) and you can then add a webhook to trigger the above url when the image is built and stored in the Github Package Registry or any other repository (e.g : Docker hub)\n\nDocker-CI can notify you by email in case of error, you can set an admin mail and individual email for each containers\n\n## Env Configuration :\nYou can specify different Env Var to the docker-ci to configure it as you want\n\n### Basic conf\n|Name|Default|Description|\n|----|----|-----------|\n|`DOCKER_HOST`|` `|The link to the docker socket engine|\n|`PORT`|`8080`|The port for the webhook server and the API|\n|`PRIVATE_KEY`|`/var/run/docker.sock:ro`|A private key to encode security tokens|\n|`BASE_URL`|`http://localhost:8080`|The base url of the system|\n## Base configuration :\nThis is the default configuration for your container, you just have to add docker-ci.enable and the image url in your docker-compose.yml :\n\n|Name|Type|Description|\n|----|----|-----------|\n| `docker-ci.enable`|`boolean`|Enable CI for this container, an endpoint will be created for this container and whenever it will be called the container image will be repulled and the container will be recreated (total update of the container)|\n| `docker-ci.name`|`string (Optional)`|Set a custom name for the endpoint, by default it is the name of the container|\n\n\n## Authentification\nIn case your package is private, you can specify credentials in your config :\n\n|Name|Type|Description|\n|----|----|-----------|\n| `docker-ci.username`|`string (Optional)`|Set a username for the docker package registry auth|\n| `docker-ci.password`|`string (Optional)`|Set a password or a token for the docker package registry auth|\n| `docker-ci.auth-server`|`string (Optional)`|Set an auth server for the docker package registry auth|\n\n## Protected Webhooks\nIf you use Github or Dockerhub to send your webhooks you can protect them, it'll be impossible to trigger them\n⚠️You can only use one of these two labels for the same container⚠️\n\n|Name|Type|Description|\n|----|----|-----------|\n|`docker-ci.webhook-callback`|`boolean (Optional)`|Some webhook validation use a callback given in the body of the request (e.g : DockerHub)|\n|`docker-ci.webhook-secret`|`string (Optional)`|Some webhook validation use a secret to encode the body with a HMAC-SHA-256 encryption (e.g : Github)|\n\n## Example\n\n### docker-compose.yml of docker-ci app\n```yaml\nversion: \"3\"\nservices:\n  docker-ci:\n    container_name: docker-ci\n    image: theodoreprevot/docker-ci:latest\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n      - ./conf:/app/conf  #Directory in which to put the mailing conf (mail.json)\n    restart: always\n    ports:\n      - \"5050:80\"\n    environment:\n      - PORT=80\n      - VERBOSE=true #Print logs\n      - NODE_ENV=production\n```\n### docker-compose.yml of application Docker-CI (example of App with a Continuous integration workflow) :\n```yaml\nversion: \"3.7\"\nservices:\n  app:\n    image: ghcr.io/totodore/automate:latest  ##The package registry link\n    container_name: automate\n    tty: true\n    expose:\n      - 80\n    restart: always\n    labels:\n      - \"docker-ci.enabled=true\"\n      - \"docker-ci.name=automate\" #This argument is optional by default it is the name of the container (container_name)\n      # The following is only if you use auth to get private package\n      - \"docker-ci.password=MyPasswordOrToken\" #Registry Password or token \n      - \"docker-ci.username=MyRegistryUsername\"\n      - \"docker-ci.auth-server=MyRegistryURL\" #Ex for Github Registry : https://ghcr.io or https://docker.pkg.github.com\n```\n\n### docker-publish in the github repo :\n```yaml\nname: Docker \n\non:\n  push:\n    # Publish `master` as Docker `latest` image.\n    branches:\n      - master\n\n    # Publish `v1.2.3` tags as releases.\n    tags:\n      - v*\n\nenv:\n  # TODO: Change variable to your image's name.\n  IMAGE_NAME: automate\n\njobs:\n  push:\n    runs-on: ubuntu-latest\n    if: github.event_name == 'push'\n\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Build image\n        run: docker build . --file Dockerfile --tag $IMAGE_NAME\n\n      - name: Log into GitHub Container Registry\n      # TODO: Create a PAT with `read:packages` and `write:packages` scopes and save it as an Actions secret `CR_PAT`\n        run: echo \"${{ secrets.CR_PAT }}\" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin\n\n      - name: Push image to GitHub Container Registry\n        run: |\n          IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME\n          # Change all uppercase to lowercase\n          IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')\n          # Strip git ref prefix from version\n          VERSION=$(echo \"${{ github.ref }}\" | sed -e 's,.*/\\(.*\\),\\1,')\n          # Strip \"v\" prefix from tag name\n          [[ \"${{ github.ref }}\" == \"refs/tags/\"* ]] \u0026\u0026 VERSION=$(echo $VERSION | sed -e 's/^v//')\n          # Use Docker `latest` tag convention\n          [ \"$VERSION\" == \"master\" ] \u0026\u0026 VERSION=latest\n          echo IMAGE_ID=$IMAGE_ID\n          echo VERSION=$VERSION\n          docker tag $IMAGE_NAME $IMAGE_ID:$VERSION\n          docker push $IMAGE_ID:$VERSION\n  deploy: \n    needs: push\n    name: deploy\n    runs-on: ubuntu-18.04\n    steps:\n      - name: Deploy docker container webhook\n        uses: joelwmale/webhook-action@master\n        env:\n          WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }} #This Docker secret correspond to http(s)://IP[:port]/deploy/automate\n```\n\n## All Labels :\n|Name|Description|\n|----|-----------|\n| `docker-ci.enable`|Enable CI for this container, an endpoint will be created for this container and whenever it will be called the container image will be repulled and the container will be recreated (total update of the container)|\n| `docker-ci.name`|Set a custom name for the endpoint, by default it is the name of the container|\n| `docker-ci.username`|Set a username for the docker package registry auth|\n| `docker-ci.password`|Set a password or a token for the docker package registry auth|\n| `docker-ci.auth-server`|Set an auth server for the docker package registry auth|\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FTotodore%2Fdocker-ci.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FTotodore%2Fdocker-ci?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotodore%2Fdocker-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotodore%2Fdocker-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotodore%2Fdocker-ci/lists"}