{"id":20214532,"url":"https://github.com/dolibarr/dolibarr-docker","last_synced_at":"2025-04-09T12:04:03.706Z","repository":{"id":248653461,"uuid":"827443481","full_name":"Dolibarr/dolibarr-docker","owner":"Dolibarr","description":"Official Dolibarr docker images. Based on the work of Garcia MICHEL (tuxgasy)","archived":false,"fork":false,"pushed_at":"2025-03-31T19:02:50.000Z","size":441,"stargazers_count":44,"open_issues_count":13,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-02T10:41:56.994Z","etag":null,"topics":["docker","dolibarr"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/dolibarr/dolibarr","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dolibarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2024-07-11T16:53:06.000Z","updated_at":"2025-04-02T09:53:58.000Z","dependencies_parsed_at":"2024-09-05T15:53:46.654Z","dependency_job_id":"37c02f54-fc36-454d-86dc-5a5bb18d8972","html_url":"https://github.com/Dolibarr/dolibarr-docker","commit_stats":{"total_commits":259,"total_committers":29,"mean_commits":8.931034482758621,"dds":0.6370656370656371,"last_synced_commit":"b9c327c6a6388f35e5aab9f0dfc436aca087ced1"},"previous_names":["dolibarr/dolibarr-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolibarr%2Fdolibarr-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolibarr%2Fdolibarr-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolibarr%2Fdolibarr-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolibarr%2Fdolibarr-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dolibarr","download_url":"https://codeload.github.com/Dolibarr/dolibarr-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036064,"owners_count":21037092,"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":["docker","dolibarr"],"created_at":"2024-11-14T06:16:40.708Z","updated_at":"2025-04-09T12:04:03.685Z","avatar_url":"https://github.com/Dolibarr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dolibarr on Docker\n\nDocker image for Dolibarr ERP \u0026 CRM Open source web suite.\n\nDolibarr is a modern software package to manage your organization's activity (contacts, quotes, invoices, orders, stocks, agenda, hr, expense reports, accountancy, ecm, manufacturing, ...).\n\n\u003e [More information](https://github.com/dolibarr/dolibarr)\n\n\n## Available versions/tags on Docker\n\nSee https://hub.docker.com/r/dolibarr/dolibarr/tags\n\n*Very old Dolibarr versions may not be updated on docker hub, but you can always get them as standard zip package from Dolibarr official web site*\n\n\n## Supported architectures\n\nLinux x86-64 (`amd64`) and ARMv8 64-bit (`arm64v8`).\n\n\n## How to run this image ?\n\nThis image is based on the [official PHP repository](https://hub.docker.com/_/php/) and the [official Dolibarr repository](https://github.com/Dolibarr/dolibarr). It is build\nusing the tools saved in the [Dolibarr docker build repository](https://github.com/Dolibarr/dolibarr-docker). \n\nThis image does not contains database, so you need to link it with a database container. Let's use [Docker Compose](https://docs.docker.com/compose/) to integrate it with [MariaDB](https://hub.docker.com/_/mariadb/) (you can also use [MySQL](https://hub.docker.com/_/mysql/) if you prefer):\n\nIf you want to have a persistent database and dolibarr data files after reboot or upgrade, you must first\ncreate a directory `/home/dolibarr_mariadb`, `/home/dolibarr_documents` and `/home/dolibarr_custom` on your host to store persistent files, respectively, of the database, of the Dolibarr document files and of the installed external Dolibarr modules.\n\n`mkdir /home/dolibarr_mariadb /home/dolibarr_documents /home/dolibarr_custom;`\n\nThen, create a `docker-compose.yml` file as following:\n\n```yaml\n# Edit this file then run \n# docker-compose up -d\n# docker-compose logs\n\nservices:\n    mariadb:\n        image: mariadb:latest\n        environment:\n            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}\n            MYSQL_DATABASE: ${MYSQL_DATABASE:-dolidb}\n            MYSQL_USER: ${MYSQL_USER:-dolidbuser}\n            MYSQL_PASSWORD: ${MYSQL_PASSWORD:-dolidbpass}\n\n        volumes:\n            - /home/dolibarr_mariadb:/var/lib/mysql\n\n    web:\n    \t# Choose the version of image to install\n    \t# dolibarr/dolibarr:latest (the latest stable version)\n    \t# dolibarr/dolibarr:develop\n    \t# dolibarr/dolibarr:x.y.z\n        image: dolibarr/dolibarr:latest\n        environment:\n            WWW_USER_ID: ${WWW_USER_ID:-1000}\n            WWW_GROUP_ID: ${WWW_GROUP_ID:-1000}\n            DOLI_DB_HOST: ${DOLI_DB_HOST:-mariadb}\n            DOLI_DB_NAME: ${DOLI_DB_NAME:-dolidb}\n            DOLI_DB_USER: ${DOLI_DB_USER:-dolidbuser}\n            DOLI_DB_PASSWORD: ${DOLI_DB_PASSWORD:-dolidbpass}\n            DOLI_URL_ROOT: \"${DOLI_URL_ROOT:-http://0.0.0.0}\"\n            DOLI_ADMIN_LOGIN: \"${DOLI_ADMIN_LOGIN:-admin}\"\n            DOLI_ADMIN_PASSWORD: \"${DOLI_ADMIN_PASSWORD:-admin}\"\n            DOLI_CRON: ${DOLI_CRON:-0}\n            DOLI_CRON_KEY: ${DOLI_CRON_KEY:-mycronsecurekey}\n            DOLI_INIT_DEMO: ${DOLI_INIT_DEMO:-0}\n            DOLI_COMPANY_NAME: ${DOLI_COMPANY_NAME:-MyBigCompany}\n\n        ports:\n            - \"80:80\"\n        links:\n            - mariadb\n        volumes:\n            - /home/dolibarr_documents:/var/www/documents\n            - /home/dolibarr_custom:/var/www/html/custom\n```\n\nThen build and run all services (-d is to run in background).\n\n`sudo docker-compose up -d`\n\nIf the \"docker-compose\" command is not available, you can replace it with the command \"docker compose\".\n\nYou can check the web and the mariadb containers are up and see logs with\n\n`sudo docker-compose ps`\n\n`sudo docker-compose logs`\n\nOnce the log shows that the start is complete (you should see a message \"You can connect to your Dolibarr web application...\"), go to http://0.0.0.0 to access to the new Dolibarr installation, first admin login is admin/admin (if you did not change default value previously in the docker-compose.yml file). \n\nNote: If the host port 80 is already used, you can replace \"80:80\" with \"xx:80\" where xx a free port on the host. You will be\nable to access the Dolibarr using the URL http://0.0.0.0:xx\n\n\nOther examples:\n\nYou can find several examples in the `examples` directory, such as:\n - [Running Dolibarr with cron (for Scheduled Tasks module)](./examples/with-cron/dolibarr-with-cron.md)\n - [Running Dolibarr with a letsencrypt certificate](./examples/with-certbot/dolibarr-with-certbot.md)\n - [Running Dolibarr with a mysql server](./examples/with-mysql/dolibarr-with-mysql.md)\n - [Running Dolibarr with a Traefik reverse proxy](./examples/with-rp-traefik/dolibarr-with-traefik.md)\n - [Running Dolibarr with secrets](./examples/with-secrets/dolibarr-with-secrets.md)\n\n\n## Upgrading Dolibarr version and migrating DB\n\nWarning: Only data stored into the persistent directories (see the section \"volumes\" of your docker-compose.yml) will not be lost after an upgrade of containers.\n\nRemove the `install.lock` file located inside the container volume `/var/www/documents` using one of this method:\n\n`sudo docker exec nameofwebcontainer bash -c \"rm -f /var/www/documents/install.lock\"`\n\nor\n\n`sudo docker exec -it nameofwebcontainer bash`\n\n`rm -f /var/www/documents/install.lock; exit`\n\nor if the document directory has been set as a persistent directory, you can do it from the host:\n\n`rm -f /home/dolibarr_documents/install.lock`\n\n\nThen download the updated version of containers and restart them.\n\n`sudo docker-compose pull`\n\n`sudo docker-compose up -d`\n\n`sudo docker-compose logs`\n\nEnsure that env `DOLI_INSTALL_AUTO` in your docker-compose.yml is set to `1` so it will migrate the Database to the new version, or\nyou can prefer to use the standard way to upgrade Dolibarr through the web interface by calling the /install page.\n\n\n## Environment variables summary\n\nYou can use the following variables for a better customization of your docker-compose file.\n\n| Variable                        | Default value                  | Description |\n| ------------------------------- | ------------------------------ | ----------- |\n| **WWW_USER_ID**                 |                                | ID of user www-data. ID will not changed if leave empty. During a development, it is very practical to put the same ID as the host user.\n| **WWW_GROUP_ID**                |                                | ID of group www-data. ID will not changed if leave empty.\n| **PHP_INI_DATE_TIMEZONE**       | *UTC*                          | Default timezone on PHP\n| **PHP_INI_MEMORY_LIMIT**        | *256M*                         | PHP Memory limit\n| **PHP_INI_UPLOAD_MAX_FILESIZE** | *2M*                           | PHP Maximum allowed size for uploaded files\n| **PHP_INI_POST_MAX_SIZE**       | *8M*                           | PHP Maximum size of POST data that PHP will accept.\n| **PHP_INI_ALLOW_URL_FOPEN**     | *0*                            | Allow URL-aware fopen wrappers\n| **DOLI_INSTALL_AUTO**           | *1*                            | 1: The installation will be done during docker first boot\n| **DOLI_INIT_DEMO**              | *0*                            | 1: The installation will also load demo data during docker first boot\n| **DOLI_PROD**                   | *1*                            | 1: Dolibarr will be run in production mode\n| **DOLI_DB_TYPE**                | *mysqli*                       | Type of the DB server (**mysqli**, pgsql)\n| **DOLI_DB_HOST**                | *mariadb*                      | Host name of the MariaDB/MySQL server\n| **DOLI_DB_HOST_PORT**           | *3306*                         | Host port of the MariaDB/MySQL server\n| **DOLI_DB_NAME**                | *dolidb*                       | Database name\n| **DOLI_DB_USER**                | *dolidbuser*                   | Database user\n| **DOLI_DB_PASSWORD**            | *dolidbpass*                   | Database user's password\n| **DOLI_URL_ROOT**               | *http://localhost*             | Url root of the Dolibarr installation\n| **DOLI_ADMIN_LOGIN**            | *admin*                        | Admin's login created on the first boot\n| **DOLI_ADMIN_PASSWORD**         | *admin*                        | Admin's initial password created on the first boot\n| **DOLI_ENABLE_MODULES**         |                                | Comma-separated list of modules to be activated at install. modUser will always be activated. (Ex: `Societe,Facture,Stock`). Modules can't be activated correctly if DOLI_COMPANY_NAME and DOLI_COMPANY_COUNTRYCODE are not set\n| **DOLI_COMPANY_NAME**           |                                | Set the company name of Dolibarr at container init\n| **DOLI_COMPANY_COUNTRYCODE**    |                                | Set the company and Dolibarr country at container init. Need 2-letter codes like \"FR\", \"GB\", \"US\",...\n| **DOLI_AUTH**                   | *dolibarr*                     | Which method is used to connect users, change to `ldap` or `ldap, dolibarr` to use LDAP\n| **DOLI_LDAP_HOST**              | *127.0.0.1*                    | The host of the LDAP server\n| **DOLI_LDAP_PORT**              | *389*                          | The port of the LDAP server\n| **DOLI_LDAP_VERSION**           | *3*                            | The version of LDAP to use\n| **DOLI_LDAP_SERVER_TYPE**       | *openldap*                     | The type of LDAP server (openLDAP, Active Directory, eGroupWare)\n| **DOLI_LDAP_LOGIN_ATTRIBUTE**   | *uid*                          | The attribute used to bind users\n| **DOLI_LDAP_DN**                | *ou=users,dc=my-domain,dc=com* | The base where to look for users\n| **DOLI_LDAP_FILTER**            |                                | The filter to authorise users to connect\n| **DOLI_LDAP_BIND_DN**           |                                | The complete DN of the user with read access on users\n| **DOLI_LDAP_BIND_PASS**         |                                | The password of the bind user\n| **DOLI_LDAP_DEBUG**             | *false*                        | Activate debug mode\n| **DOLI_CRON**                   | *0*                            | 1: Enable cron service\n| **DOLI_CRON_KEY**               |                                | Security key launch cron jobs\n| **DOLI_CRON_USER**              |                                | Dolibarr user used for cron jobs\n| **DOLI_INSTANCE_UNIQUE_ID**     |                                | Secret ID used as a salt / key for some encryption. By default, it is set randomly when the docker container is created.\n\nSome environment variables are compatible with docker secrets behaviour, just add the `_FILE` suffix to var name and point the value file to read.\nEnvironment variables that are compatible with docker secrets:\n\n* `DOLI_DB_USER` =\u003e `DOLI_DB_USER_FILE`\n* `DOLI_DB_PASSWORD` =\u003e `DOLI_DB_PASSWORD_FILE`\n* `DOLI_ADMIN_LOGIN` =\u003e `DOLI_ADMIN_LOGIN_FILE`\n* `DOLI_ADMIN_PASSWORD` =\u003e `DOLI_ADMIN_PASSWORD_FILE`\n* `DOLI_CRON_KEY` =\u003e `DOLI_CRON_KEY_FILE`\n* `DOLI_CRON_USER` =\u003e `DOLI_CRON_USER_FILE`\n* `DOLI_INSTANCE_UNIQUE_ID` =\u003e `DOLI_INSTANCE_UNIQUE_ID_FILE`\n\n\n\n## Advanced setup\n\n### Add post-deployment and before starting scripts\n\nIt is possible to execute `*.sh`, `*.sql` and/or `*.php` custom files at the end of a deployment or before starting Apache by mounting volumes.\nFor scripts to execute during deployment, mount volume in `/var/www/scripts/docker-init.d`.\nFor scripts to execute before Apache start, mount volume in `/var/www/scripts/before-starting.d`.\n```\n\\docker-init.d\n|- custom_script.sql\n|- custom_script.php\n|- custom_script.sh\n```\n\nMount the volumes with compose file : \n\n```yaml\nservices:\n    mariadb:\n        image: mariadb:latest\n        environment:\n            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}\n            MYSQL_DATABASE: ${MYSQL_DATABASE:-dolidb}\n            MYSQL_USER: ${MYSQL_USER:-dolidbuser}\n            MYSQL_PASSWORD: ${MYSQL_PASSWORD:-dolidbpass}\n\n    web:\n    \t# Choose the version of image to install\n    \t# dolibarr/dolibarr:latest (the latest stable version)\n    \t# dolibarr/dolibarr:develop\n    \t# dolibarr/dolibarr:x.y.z\n        image: dolibarr/dolibarr\n        environment:\n            DOLI_DB_HOST: ${DOLI_DB_HOST:-mariadb}\n            DOLI_DB_NAME: ${DOLI_DB_NAME:-dolidb}\n            DOLI_DB_USER: ${DOLI_DB_USER:-dolidbuser}\n            DOLI_DB_PASSWORD: ${DOLI_DB_PASSWORD:-dolidbpass}\n            DOLI_URL_ROOT: \"${DOLI_URL_ROOT:-http://0.0.0.0}\"\n            DOLI_ADMIN_LOGIN: \"${DOLI_ADMIN_LOGIN:-admin}\"\n            DOLI_ADMIN_PASSWORD: \"${DOLI_ADMIN_PASSWORD:-admin}\"\n            DOLI_CRON: ${DOLI_CRON:-0}\n            DOLI_CRON_KEY: ${DOLI_CRON_KEY:-mycronsecurekey}\n            DOLI_INIT_DEMO: ${DOLI_INIT_DEMO:-0}\n            WWW_USER_ID: ${WWW_USER_ID:-1000}\n            WWW_GROUP_ID: ${WWW_GROUP_ID:-1000}\n        volumes :\n          - volume-scripts:/var/www/scripts/docker-init.d\n          - before-starting-scripts:/var/www/scripts/before-starting.d\n        ports:\n            - \"80:80\"\n        links:\n            - mariadb\n```\n\n\n### Tuning the apache configuration to suit you\n\n#### ServerName\n\nIf you run apache2ctl configtest inside the container you'll probably get a message like this:\n\u003e AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using x.y.z.w Set the 'ServerName' directive globally to suppress this message\n\nEasy fix, create a single text file\n\nContents: \"ServerName dolibarr.example.com\"\n\nMountpoint: \"/etc/apache2/conf-enabled/servername.conf\"\n\nread-only: Yes, mount it read only with :ro \n\n#### Running your dolibarr behind a proxy?\n\nIf you want Dolibarr or the logs from the dolibarr container to reveal the original IP address and not just the proxy's IP address you should create 2 text files:\n\n*remoteip.load*\nThis file will load the apache module remoteip https://httpd.apache.org/docs/current/mod/mod_remoteip.html\n\nContents: \"LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so\"\n\nMountpoint: \"/etc/apache2/mods-enabled/remoteip.load\"\n\nread-only: Yes, mount it read only with :ro \n\n*remoteip.conf*\nThis file will contain the configuration for remoteip and should also be bind mounted read-only inside the container. Content will depend on your proxy and which kind of header it uses. You may perhaps also enable the proxy protocol, read more at https://httpd.apache.org/docs/current/mod/mod_remoteip.html\n\nExample content: \"RemoteIPHeader X-Forwarded-For\"\n\nMountpoint: \"/etc/apache2/mods-enabled/remoteip.conf\"\n\n\n### Support for PostgreSQL\n\nSetting `DOLI_DB_TYPE` to `pgsql` enable Dolibarr to run with a PostgreSQL database.\nWhen set to use `pgsql`, Dolibarr must be installed manually on it's first execution:\n - Browse to `http://0.0.0.0/install`;\n - Follow the installation setup;\n - Add `install.lock` inside the container volume `/var/www/html/documents` (ex `docker-compose exec services-data_dolibarr_1 /bin/bash -c \"touch /var/www/html/documents/install.lock\"`).\n\nWhen setup this way, to upgrade version the use of the web interface is mandatory:\n - Remove the `install.lock` file (ex `docker-compose exec services-data_dolibarr_1 /bin/bash -c \"rm -f /var/www/html/documents/install.lock\"`).\n - Browse to `http://0.0.0.0/install`;\n - Upgrade DB;\n - Add `install.lock` inside the container volume `/var/www/html/documents` (ex `docker-compose exec services-data_dolibarr_1 /bin/bash -c \"touch /var/www/html/documents/install.lock\"`).\n\n \n## Trouble shooting\n\nIf you get error \"urllib3.exceptions.URLSchemeUnknown: Not supported URL scheme http+docker\" during docker-compose, try to upgrade or downgrade the pip package:\npip install requests==2.31.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolibarr%2Fdolibarr-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdolibarr%2Fdolibarr-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolibarr%2Fdolibarr-docker/lists"}