{"id":18400448,"url":"https://github.com/docksal/service-cli","last_synced_at":"2025-04-09T12:05:52.180Z","repository":{"id":11313486,"uuid":"69269183","full_name":"docksal/service-cli","owner":"docksal","description":"CLI service image for Docksal","archived":false,"fork":false,"pushed_at":"2024-10-18T18:15:47.000Z","size":972,"stargazers_count":19,"open_issues_count":11,"forks_count":45,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2024-10-29T23:49:18.017Z","etag":null,"topics":["drush","nvm","pantheon","php","terminus","xdebug"],"latest_commit_sha":null,"homepage":"https://docksal.io","language":"Shell","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/docksal.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"docksal","open_collective":"docksal"}},"created_at":"2016-09-26T16:21:58.000Z","updated_at":"2024-10-05T08:44:12.000Z","dependencies_parsed_at":"2023-09-26T18:04:37.250Z","dependency_job_id":"357d5555-1f30-4868-888c-6d1e5e6b8e62","html_url":"https://github.com/docksal/service-cli","commit_stats":{"total_commits":815,"total_committers":32,"mean_commits":25.46875,"dds":"0.39018404907975457","last_synced_commit":"5e04c858297fbe5fa76aa02c2e9b46da16cc206b"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docksal","download_url":"https://codeload.github.com/docksal/service-cli/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247988509,"owners_count":21029126,"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":["drush","nvm","pantheon","php","terminus","xdebug"],"created_at":"2024-11-06T02:33:26.152Z","updated_at":"2025-04-09T12:05:52.157Z","avatar_url":"https://github.com/docksal.png","language":"Shell","funding_links":["https://github.com/sponsors/docksal","https://opencollective.com/docksal"],"categories":[],"sub_categories":[],"readme":"# CLI Docker image for Docksal\n\nThis image focuses on console tools necessary to develop LAMP stack (and other web) applications.\n\nThis image(s) is part of the [Docksal](https://docksal.io) image library.\n\n## Features\n\n- Based on the official php-fpm Debian 12 (bookworm) images \n- php/php-fpm (w/ xdebug), nodejs (via nvm), python, ruby\n- Framework specific tools for Drupal and Wordpress\n- Miscellaneous cli tools for day to day web development\n- Hosting provider cli tools (Acquia, Pantheon, Platform.sh)\n- Cron job scheduling\n- Custom startup script support\n- [VS Code Server](https://github.com/cdr/code-server) (VS Code in the browser)\n- Multi-platform images (amd64/arm64) starting with v3.0.0\n\n## Versions and image tag naming convention\n\n- Stable versions v3\n  - `php8.1-3.8`, `php8.1` - PHP 8.1\n  - `php8.2-3.8`, `php8.2` - PHP 8.2\n  - `php8.3-3.8`, `php8.3`, `latest` - PHP 8.3\n- Development versions\n  - `php8.1-edge` - PHP 8.1\n  - `php8.2-edge` - PHP 8.2\n  - `php8.3-edge` - PHP 8.3\n\n## PHP\n\n- php-fpm \u0026\u0026 php-cli\n- xdebug v3\n- composer v1 \u0026 v2\n- drush (Drupal)\n  - coder-8.x + phpcs\n- drupal console launcher (Drupal)\n- wp-cli (Wordpress)\n\nThis image uses the official `php-fpm` images from [Docker Hub](https://hub.docker.com/_/php/) as the base.\nThis means that PHP and all modules are installed from source. Extra modules have to be installed in the same\nmanner (installing them with `apt-get` won't work).\n\n### Available PHP database drivers\n\n- SQLite - via `sqlite3`, `pdo_sqlite`\n- MySQL - via `mysqli`, `mysqlnd`, `pdo_mysql`\n- PostgreSQL - via `pgsql`, `pdo_pgsql`\n- MSSQL - via `sqlsrv` and `pdo_sqlsrv`\n\n### Using PHP Xdebug\n\nXdebug is disabled by default.\n\nTo enable it, run the image with `XDEBUG_ENABLED=1`:\n\n```yml\ncli\n...\n  environment:\n    ...\n    - XDEBUG_ENABLED=1\n    ...\n```\n\n[See docs](https://docs.docksal.io/tools/xdebug/) on using Xdebug for web and cli PHP debugging.\n\n## NodeJS\n\n- nvm\n- node v20.12.2 (following NodeJS LTS release cycle)\n- yarn (classic v1)\n\nNodeJS is installed via `nvm` in the `docker` user's profile inside the image (`/home/docker/.nvm`).\n\nIf you need a different version of node, use `nvm` to install it, e.g., `nvm install 21.7.3`.\nThen, use `nvm use 21.7.3` to use it in the current session or `nvm alias default 21.7.3` to use it by default.\n\n## Python\n\nThis image comes with a system level installed Python v3.9.x from upstream Debian 11.\n\n## Ruby\n\nThis image comes with a system level installed Ruby v2.7.x from upstream Debian 11.\n\n## Notable console tools\n\n- git with git-lfs\n- curl, wget\n- zip, unzip\n- jq, yq\n- mysql, pgsql, and sqlsrv cli clients\n- imagemagick, ghostscript\n- mc, nano, rsync\n- cron\n\n## Hosting provider tools\n\n- `acli` for Acquia Cloud APIv2 ([Acquia](https://docs.acquia.com/acquia-cli/))\n- `terminus` ([Pantheon](https://pantheon.io/features/terminus-command-line-interface))\n- `platform` ([Platform.sh](https://docs.platform.sh/development/cli.html))\n\nAlso, see the [Secrets](#secrets) section below for more information on managing and using your hosting provider keys.\n\n## Customizing startup\n\nTo run a custom startup script anytime the `cli` container has started, create a `startup.sh` file within the\n`.docksal/services/cli` directory. Additionally, make sure that the file is executable as well so that the container\ndoes not run into issues when attempting to execute the file.\n\n## Scheduling cron jobs\n\nCron can be configured by making sure there is a `crontab` file located within `.docksal/services/cli`. The file should\nfollow the [standard crontab format](http://www.nncron.ru/help/EN/working/cron-format.htm).\n\n\n\u003ca name=\"secrets\"\u003e\u003c/a\u003e\n## Secrets and integrations\n\n`cli` can read secrets from environment variables and configure the respective integrations automatically at start.\n\nThe recommended place store secrets in Docksal is the global `$HOME/.docksal/docksal.env` file on the host. From there,\nsecrets are injected into the `cli` container's environment.\n\nBelow is the list of secrets currently supported.\n\n`SECRET_SSH_PRIVATE_KEY`\n\nUse to pass a private SSH key. The key will be stored in `/home/docker/.ssh/id_rsa` inside `cli` and will be considered\nby the SSH client **in addition** to the keys loaded in `docksal-ssh-agent` when establishing a SSH connection\nfrom within `cli`.\n\nThis is useful when you need a project stack to inherit a private SSH key that is not shared with other project stacks\non the same host (e.g., in shared CI environments).\n\nThe value must be base64 encoded, i.e.:\n\n```bash\ncat /path/to/some_key_rsa | base64\n```\n\n`SECRET_ACQUIA_CLI_KEY` and `SECRET_ACQUIA_CLI_SECRET`\n\nCredentials used to authenticate [Acquia CLI](https://github.com/acquia/cli) with Acquia Cloud APIv2.\nStored as `ACQUIA_CLI_KEY` and `ACQUIA_CLI_SECRET` environment variables inside `cli`.\n\nAcquia CLI is installed and available globally in `cli` as `acli`.\n\n`SECRET_TERMINUS_TOKEN`\n\nCredentials used to authenticate [Terminus](https://pantheon.io/docs/terminus) with Pantheon.\nStored in `/home/docker/.terminus/` inside `cli`.\n\nTerminus is installed and available globally in `cli` as `terminus`.\n\n`SECRET_PLATFORMSH_CLI_TOKEN`\n\nCredentials used to authenticate with the [Platform.sh CLI](https://github.com/platformsh/platformsh-cli) tool.\nStored in `/home/docker/.platform` inside `cli`.\n\nPlatform CLI is installed and available globally in `cli` as `platform`.\n\n`WEB_KEEPALIVE`\n\nSets the delay in seconds between pings of the web container during execution `fin exec`. Setting this variable to non zero value prevents the project from stopping in cases of long `fin exec` and web container inactivity. Disabled by default (set to 0).\n\n## Git configuration\n\nWhen working with git from within the image, it will ask for the `user.email` and `user.name` set before you can commit.\nThese can be passed as environment variables and will be applied at the container startup.\n\n```\nGIT_USER_EMAIL=\"git@example.com\"\nGIT_USER_NAME=\"Docksal CLI\"\n```\n\n\u003ca name=\"ide\"\u003e\u003c/a\u003e\n## Coder (Visual Studio Code web IDE)\n\n[Coder](https://coder.com/) is a free, open-source web IDE.\n\nVS Code Server is pre-installed along with GitLens and PHP Xdebug extensions.\n\n### Configuration\n\n`IDE_ENABLED` (default: 0)\n\nSet to `1` to start the image in IDE mode. VS Code web UI will is listening on port `8080`.\n\n`IDE_PASSWORD` (default: '')\n\nStore your preferred password in this variable if you need to password protect the IDE environment.\n\n[See docs](https://docs.docksal.io/tools/ide/) for instructions on using Coder in Docksal.\n\n## Composer\n\nComposer v1 and v2 are both installed in the container. v2 is set as the default version, but while not all\nprojects may be able to work with v2 quite yet, v1 is available by setting the `COMPOSER_DEFAULT_VERSION` variable to `1`.\n\nExample:\n\n```\nservices:\n  cli:\n    environment:\n      - COMPOSER_DEFAULT_VERSION=1\n```\n\nThe following Composer optimization packages are no longer relevant/compatible with Composer v2 and have been dropped:\n\n- [hirak/prestissimo](https://github.com/hirak/prestissimo)\n- [zaporylie/composer-drupal-optimizations](https://github.com/zaporylie/composer-drupal-optimizations)\n\nTo benefit from these optimizations with Composer v1, you would need to pin the image to an older version.\nSee Docksal [documentation](https://docs.docksal.io/service/cli/settings#composer) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocksal%2Fservice-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocksal%2Fservice-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocksal%2Fservice-cli/lists"}