{"id":13903060,"url":"https://github.com/jeliasson/dockr","last_synced_at":"2025-07-18T00:33:06.571Z","repository":{"id":47656879,"uuid":"189708714","full_name":"jeliasson/dockr","owner":"jeliasson","description":"The goal of dockr is to help you administer docker-compose and your container config files in a easy and predictable way. It's main purpose is to find compose.yaml-files, verify their syntax, and merge them into one to run.","archived":true,"fork":false,"pushed_at":"2021-08-19T12:46:45.000Z","size":74,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-25T11:39:57.643Z","etag":null,"topics":["cli","docker","docker-compose","docker-management-tool","dockr","yaml-parser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeliasson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-01T08:25:09.000Z","updated_at":"2024-11-02T08:23:44.000Z","dependencies_parsed_at":"2022-08-30T05:21:08.164Z","dependency_job_id":null,"html_url":"https://github.com/jeliasson/dockr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeliasson/dockr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeliasson%2Fdockr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeliasson%2Fdockr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeliasson%2Fdockr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeliasson%2Fdockr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeliasson","download_url":"https://codeload.github.com/jeliasson/dockr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeliasson%2Fdockr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265685524,"owners_count":23811191,"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":["cli","docker","docker-compose","docker-management-tool","dockr","yaml-parser"],"created_at":"2024-08-06T22:01:35.686Z","updated_at":"2025-07-18T00:33:06.234Z","avatar_url":"https://github.com/jeliasson.png","language":"JavaScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"## Dockr\n\n\u003e :warning: This repository has been discontinued. It was once created as a personal replacement to [DockSTARTER](https://dockstarter.com/) but I have since then moved on to more automation layers, such as [ansible](https://www.ansible.com/). \n\n\n[![Build Status](https://www.travis-ci.com/jeliasson/dockr.svg?branch=master)](https://www.travis-ci.com/jeliasson/dockr)\n[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)\n\n`dockr` is CLI tool for managing docker-compose files, currently building on **Ubuntu/Debian**.\n\nThe goal of `dockr` is to help you administer docker-compose and your container config files in a easy and predictable way. It's main purpose is to find `compose.yaml`-files in the `config/**/` directory, verify their syntax, and merge them into one to run with `docker-compose`.\n\nYou may use this tool how you like. In the end, it's just merging your docker-compose files into one, and can optionally use global and app specific environment variables.\n\nPlease note that this project is under development. While it's being used in small production, do not use this in your production environment until you feel comfortable.\n\n\n- [Dockr](#dockr)\n- [Features](#features)\n- [Getting started](#getting-started)\n  - [Installation](#installation)\n    - [One-line installation](#one-line-installation)\n- [Verify installation](#verify-installation)\n- [Create an app](#create-an-app)\n- [Use Dockr](#use-dockr)\n    - [Generated docker-compose.yaml](#generated-docker-composeyaml)\n    - [Docker-compose and orphans](#docker-compose-and-orphans)\n- [Environment](#environment)\n  - [App environment variables](#app-environment-variables)\n  - [Global environment variables](#global-environment-variables)\n- [Use Dockr using container (experimental)](#use-dockr-using-container-experimental)\n    - [docker run](#docker-run)\n    - [docker-compose (Example)](#docker-compose-example)\n- [Contribute](#contribute)\n  - [Development](#development)\n\n## Features\n\n- One-line installation and setup\n- Easily create a new dockr app from a template using `dockr run [app]`\n- Environment variables templating in `compose.yaml` files\n- Verify, merge and docker-compose up using `dockr run`\n- Easy update to latest version of dockr using `dockr update`\n\n## Getting started\n\n### Installation\n\nThis one-line installation currently building on **Ubuntu/Debian** using `apt` as package manager.\nBefore you start the installation, make sure that `git`, `node` and `docker` is installed.\n\n#### One-line installation\n\nAs a general note, never trust installation scripts from unknown sources. This includes this project and repository. If you want to inspect the installation scripts, broadly see [install.sh](https://raw.githubusercontent.com/jeliasson/dockr/master/app/scripts/install.sh) and [setup.sh](https://raw.githubusercontent.com/jeliasson/dockr/master/app/scripts/setup.sh). You may also check out the [latest builds](https://www.travis-ci.com/jeliasson/dockr) to see what to expect.\n\n```bash\nwget -Nnv https://raw.githubusercontent.com/jeliasson/dockr/master/app/scripts/install.sh 2\u003e\u00261 \u003e/dev/null \u0026\u0026 bash install.sh\n```\n\n## Verify installation\n\nMake sure everything went fine by either running `dockr` or `dockr info`. You can also use the alias `dr`, e.g. `dr info`.\n\n```text\n$ dockr\n\nUsage: dockr [options] [command]\n\nOptions:\n  -V, --version  output the version number\n  -h, --help     output usage information\n\nCommands:\n  run            verify, merge and compose up\n  edit [app]     edit app composer.yaml\n  logs [app]     dockr logs, or dockr app logs\n  create [app]   create a new app with boilerplates\n  compose [cmd]  docker-compose wrapper\n  backup         make a backup of dockr\n  config         cd to dockr config directory\n  info           info about the dockr installation\n  logs [app]     dockr logs, or dockr app logs\n  update         update dockr\n  verify         verify syntax of all yaml files\n  test           test docker-compose files\n  clean          clean temporary generated files\n  help           this help section\n  help [cmd]     display help for [cmd]\n```\n\n## Create an app\n\nIn dockr, a directory in `config/` is refered as in **_app_**, e.g. app `portainer` will reside in `config/portainer`. To create an app, run `docker create \u003capp\u003e`.\n\nThe generated docker-compose file `config/\u003capp\u003e/compose.yaml` should contain your normal docker-compose directives, and you can use [environment variables](#environment) in these directives.\n\n## Use Dockr\n\nRunning `dockr run` will verify, merge and `docker-compose up` your apps, e.g.\n\n```bash\n$ dr run\n\nℹ Finding yaml files in config directory...\n\n- Processing dockr-hello\n- Processing portainer\n\n✔ Merge of files completed.\n\nℹ Running docker-compose...\n\ndockr-hello is up-to-date\nportainer is up-to-date\n```\n\n_In above example, both images were already built and running._\n\n#### Generated docker-compose.yaml\n\nGenerated docker-compose file will be placed in the root path of dockr, by default `~/dockr/docker-compose.yaml`.\n\n#### Docker-compose and orphans\n\n`dockr run` will effectively run `docker-compose -f ~/docker/docker-compose.yaml -d --remove-orphans up` once app yaml files has been parsed.\n\nBy passing `--remove-orphans`, docker will delete containers that have been removed from the same [docker compose stack](https://docs.docker.com/get-started/part5/). In this case, containers that has been created using dockr. It will not delete containers you've created outside of dockr.\n\n## Environment\n\nDuring `dockr run`, when generating app docker-compose files, dockr will bring envioronment runtime such as [app environment variabels](#app-environment-variables) and [global environment variabels](#global-environment-variables) and have them merged with placeholders in respective `compose.yaml` file.\n\n### App environment variables\n\nEnvironment variables is defined in the `.env` file in your app directory. If you created the app using `dockr run`, this file has been created for you. Example syntax that would set environment variable `PORT` to value `8080`.\n\n```bash\nPORT=8080\n```\n\nThese environment variables may be used in `compose.yaml` files, e.g. `${{PORT}}` would result in `8080`.\n\n### Global environment variables\n\nIt's recommended to use globally defined and generated environment variables, such as `${{DATA_DIR}}`, that would return the absolute `data` path to the app during merge.\n\n| Scope  | Variable          | Value                            | Description                                                       |\n| ------ | ----------------- | -------------------------------- | ----------------------------------------------------------------- |\n| Global | `PUID`            | `1000`                           | Default system user id to run docker containers.                  |\n| Global | `PGID`            | `1000`                           | Default system group id to run docker containers.                 |\n| Global | `DOCKR_APP_NAME`  | `[app]`                          | App name during merge process of yaml files                       |\n| Global | `DOCKR_APP_PATH`  | `/[...]/config/[app]`            | Absolute app path during merge process of yaml files              |\n| Global | `DOCKR_DATA_PATH` | `/[...]/dockr/config/\u003capp\u003e/data` | Absolute path to apps `data` directory                            |\n| Global | `DOCKR_DISABLED`  | `\u003cnot set\u003e`                      | Disables parse of app's `compose.yaml` if env set                 |\n| Global | `TZ`              | `Europe/Malta`                   | Timezone                                                          |\n| App    | `PORT`            | `8080`                           | Example described in [App variables](#App-environment-variables). |\n\n## Use Dockr using container (experimental)\n\nWorking on having the `dockr` command wrapped to run the dockr image, and the end result would be to use dockr without installing any dependencies locally, besides docker of course.\n\n#### docker run\n\nBefore the image is stable and ready for having an alias for `dockr`, we'll build the image and run it manually.\n\n```\ncd ~/docker\ndocker build -t dockr app\ndocker run -v config:/config dockr info\n```\n\n#### docker-compose (Example)\n\n```\ncd ~/dockr\ndocker-compose --remove-orphans -f ./app/docker-compose.yaml up\n```\n\n## Contribute\n\nFeel free to fork and send a [Pull Request](pulls/) if you see something that can be made better. ❤️\n\n### Development\n\nTo setup your development dockr, run `sh ./app/scripts/install-dev.sh`. What's different between the original installation script is basically checking out the dev-branch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeliasson%2Fdockr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeliasson%2Fdockr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeliasson%2Fdockr/lists"}