GithubHelp home page GithubHelp logo

tuxgasy / docker-dolibarr Goto Github PK

View Code? Open in Web Editor NEW
114.0 12.0 86.0 303 KB

Docker image for Dolibarr with auto installer on first boot

Home Page: https://hub.docker.com/r/tuxgasy/dolibarr/

License: GNU General Public License v3.0

Shell 76.96% Dockerfile 13.57% PHP 9.47%
docker docker-image dolibarr dolibarr-erp

docker-dolibarr's Introduction

Dolibarr on Docker

Docker image for Dolibarr with auto installer on first boot.

Supported tags

  • 15.0.3-php7.4 15.0.3 15
  • 16.0.5-php8.1 16.0.5 16
  • 17.0.4-php8.1 17.0.4 17
  • 18.0.5-php8.1 18.0.5 18
  • 19.0.2-php8.2 19.0.2 19 latest
  • develop

End of support for PHP < 7.4

Dolibarr versions 7, 8, 9, 10, 11, 12, 13, 14 no more updated

Supported architectures

Linux x86-64 (amd64), ARMv7 32-bit (arm32v7 ⚠️ MariaDB/Mysql docker images don't support it) and ARMv8 64-bit (arm64v8)

What is Dolibarr ?

Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).

More information

How to run this image ?

This image is based on the official PHP repository.

Important: This image don't contains database. So you need to link it with a database container.

Let's use Docker Compose to integrate it with MariaDB (you can also use MySQL if you prefer).

Create docker-compose.yml file as following:

version: "3"

services:
    mariadb:
        image: mariadb:latest
        environment:
            MYSQL_ROOT_PASSWORD: root
            MYSQL_DATABASE: dolibarr

    web:
        image: tuxgasy/dolibarr
        environment:
            DOLI_DB_HOST: mariadb
            DOLI_DB_USER: root
            DOLI_DB_PASSWORD: root
            DOLI_DB_NAME: dolibarr
            DOLI_URL_ROOT: 'http://0.0.0.0'
            PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
        ports:
            - "80:80"
        links:
            - mariadb

Then run all services docker-compose up -d. Now, go to http://0.0.0.0 to access to the new Dolibarr installation.

Other examples

You can find several examples in the examples directory, such as:

Upgrading version and migrating DB

The install.lock file is located inside the container volume /var/www/documents.

Remove the install.lock file and start an updated version container. Ensure that env DOLI_INSTALL_AUTO is set to 1. It will migrate Database to the new version. You can still use the standard way to upgrade through web interface.

Early support for PostgreSQL

Setting DOLI_DB_TYPE to pgsql enable Dolibarr to run with a PostgreSQL database. When set to use pgsql, Dolibarr must be installed manually on it's first execution:

  • Browse to http://0.0.0.0/install;
  • Follow the installation setup;
  • 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").

When setup this way, to upgrade version the use of the web interface is mandatory:

  • Remove the install.lock file (ex docker-compose exec services-data_dolibarr_1 /bin/bash -c "rm -f /var/www/html/documents/install.lock").
  • Browse to http://0.0.0.0/install;
  • Upgrade DB;
  • 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").

Environment variables summary

Variable Default value Description
DOLI_INSTALL_AUTO 1 1: The installation will be executed on first boot
DOLI_PROD 1 1: Dolibarr will be run in production mode
DOLI_DB_TYPE mysqli Type of the DB server (mysqli, pgsql)
DOLI_DB_HOST mysql Host name of the MariaDB/MySQL server
DOLI_DB_HOST_PORT 3306 Host port of the MariaDB/MySQL server
DOLI_DB_USER doli Database user
DOLI_DB_PASSWORD doli_pass Database user's password
DOLI_DB_NAME dolidb Database name
DOLI_ADMIN_LOGIN admin Admin's login create on the first boot
DOLI_ADMIN_PASSWORD admin Admin'password
DOLI_URL_ROOT http://localhost Url root of the Dolibarr installation
DOLI_ENABLE_MODULES Comma-separated list of modules to be activated at install. modUser will always be activated. (Ex: Societe,Facture,Stock)
DOLI_COMPANY_NAME Set the company name of Dolibarr at container init
DOLI_COMPANY_COUNTRYCODE Set the company and Dolibarr country at container init. Need 2-letter codes like "FR", "GB", "US",...
PHP_INI_DATE_TIMEZONE UTC Default timezone on PHP
PHP_INI_MEMORY_LIMIT 256M PHP Memory limit
PHP_INI_UPLOAD_MAX_FILESIZE 2M PHP Maximum allowed size for uploaded files
PHP_INI_POST_MAX_SIZE 8M PHP Maximum size of POST data that PHP will accept.
PHP_INI_ALLOW_URL_FOPEN 0 Allow URL-aware fopen wrappers
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.
WWW_GROUP_ID ID of group www-data. ID will not changed if leave empty.
DOLI_AUTH dolibarr Which method is used to connect users, change to ldap or ldap, dolibarr to use LDAP
DOLI_LDAP_HOST 127.0.0.1 The host of the LDAP server
DOLI_LDAP_PORT 389 The port of the LDAP server
DOLI_LDAP_VERSION 3 The version of LDAP to use
DOLI_LDAP_SERVER_TYPE openldap The type of LDAP server (openLDAP, Active Directory, eGroupWare)
DOLI_LDAP_LOGIN_ATTRIBUTE uid The attribute used to bind users
DOLI_LDAP_DN ou=users,dc=my-domain,dc=com The base where to look for users
DOLI_LDAP_FILTER The filter to authorise users to connect
DOLI_LDAP_BIND_DN The complete DN of the user with read access on users
DOLI_LDAP_BIND_PASS The password of the bind user
DOLI_LDAP_DEBUG false Activate debug mode
DOLI_CRON 0 1: Enable cron service
DOLI_CRON_KEY Security key launch cron jobs
DOLI_CRON_USER Dolibarr user used for cron jobs
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.

Some environment variables are compatible with docker secrets behaviour, just add the _FILE suffix to var name and point the value file to read. Environment variables that are compatible with docker secrets:

  • DOLI_DB_USER => DOLI_DB_USER_FILE
  • DOLI_DB_PASSWORD => DOLI_DB_PASSWORD_FILE
  • DOLI_ADMIN_LOGIN => DOLI_ADMIN_LOGIN_FILE
  • DOLI_ADMIN_PASSWORD => DOLI_ADMIN_PASSWORD_FILE
  • DOLI_CRON_KEY => DOLI_CRON_KEY_FILE
  • DOLI_CRON_USER => DOLI_CRON_USER_FILE
  • DOLI_INSTANCE_UNIQUE_ID => DOLI_INSTANCE_UNIQUE_ID_FILE

Add post-deployment scripts

It is possible to execute *.sh, *.sql and/or *.php custom file at the end of deployment by mounting a volume in /var/www/scripts/docker-init.d

\docker-init.d
|- custom_script.sql
|- custom_script.php
|- custom_script.sh

Mount the volume with compose file :

version: "3"

services:
    mariadb:
        image: mariadb:latest
        environment:
            MYSQL_ROOT_PASSWORD: root
            MYSQL_DATABASE: dolibarr

    web:
        image: tuxgasy/dolibarr
        environment:
            DOLI_DB_HOST: mariadb
            DOLI_DB_USER: root
            DOLI_DB_PASSWORD: root
            DOLI_DB_NAME: dolibarr
            DOLI_URL_ROOT: 'http://0.0.0.0'
            PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
        volumes :
          - volume-scripts:/var/www/scripts/docker-init.d
        ports:
            - "80:80"
        links:
            - mariadb

docker-dolibarr's People

Contributors

albandurrheimer avatar arnaud-trouche avatar chmat avatar elkoiko avatar florentpoinsaut avatar fpeyraud avatar jer0m avatar loicha avatar m8nky avatar mathieu-rossignol avatar mathieupotier avatar mklhx avatar nurlanf avatar realdayaa avatar romain-dartigues avatar ryther avatar sebastien-prudhomme avatar tuxgasy avatar vaadasch avatar vincowl avatar wystik-69 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-dolibarr's Issues

ADD Volumen /var/www/html

I need to add a volume to the image, / var / www / html. I have tried to do it through Dokerfile, but I could not, because I am a bit of a newbie.
If you could add it, I would appreciate it.
Thanks a lot.

Update broke

I just updated and moved the volumes and now Dolibarr seems broken.

When I try to login now I get the following error:

Table 'dolibarr.llx_user' doesn't exist

I have DOLI_INSTALL_AUTO=1

Here are the steps I did:

  • docker-compose pull && docker-compose up -d
  • I had the message saying to rm install.lock
  • I couldn't find the volumes because of a typo in my docker-compose.yml. I had dolibarr-docs:/var/www/documents and mysql-data:/var/lib/mysql instead of (for my setup) ./dolibarr-docs:/var/www/documents and ./mysql-data:/var/lib/mysql.
  • I ran mv /var/lib/docker/volumes/dolibarr_dolibarr-docs /opt/Dolibarr/dolibarr-docs and mv /var/lib/docker/volumes/dolibarr_mysql-data /opt/Dolibarr/mysql-data and adapted the docker-compose.yml to fit the changes.
  • Finally, I ran rm /opt/Dolibarr/dolibarr-docs/_data/install.lock and docker-compose up -d

My guess is I deleted the install.lock before the migration could succeed.

Dolibarr on qnap container station

Hello, I would like to use the docker image on a qnap container station.
When I start the docker I get the following error :
" standard_init_linux.go:228: exec user process caused: exec format error "

It is the only thing , that appears. What can be done to avoid this and run the docker?

I am thankfull for all sugestions. 👍

SSL with file and not certbot

Hello,

Like always, thank you for the job first.

I wanna know if it's possible to you to provide me an example to use SSL with file in a volume. I always find something with a certbot but my PI is the CA :).

If you have not trusted CA, you can not have the good warning for https in chrome but that crypt the data and is firefox you can put that CA as an exeption and that crypt the traffic to. For now if you want the sensor like camera it's ok with firefox put with chrome yo have to handle Insecure origins treated as secure put if you had the ip of your CA is good too.
So all work in fact with an auto genrate certificat execpt the certbot and i dont need it.

Could you please show me the way to put that file in a volume?

Have a good day.

REST Api module not working

It works with some routes, but the main route localhost/api/inedx.php/explorer is not working. This error appears.

API not found (failed to include API file)

If I make a GET request to /status It works.

I found this issue on the main repo that apparently was fixed, is this build a previous version?

I used the docker build from the main site and I have no issues there. I guess I can develop with the "development" docker build and use this when I am done with integrations. But this does not seem too good of a solution either.

LDAPS TLS_Reqcert allow

Hi,

is there a way to tell dolibarr or the underlying webserver to ignore the LDAPS-server-certificate?

Thanks and regards
Max

Can't start the container

I allways get the following error

ERROR: The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services: 'mariadb'

Upgrade Dolibarr 9.0.0 to 10.0.3

Thanks for the image. I just installed it without any issue. Just wanted to check, how can i upgrade the version from 9.0.0 to 10.0.3?

Thanks in advance.

Using a backend network causes apache to become inconsistent

My docker-compose:

version: "3.8"

networks:
    backend:
        internal: true
    webgateway:
        external: true
    dbgateway:
        external: true

secrets:
    mysql-user:
        file: ../secrets/dolibarr_mysql_user.secret
    mysql-password:
        file: ../secrets/dolibarr_mysql_password.secret

services:
    mariadb:
        image: mariadb:latest
        secrets:
            - mysql-user
            - mysql-password
        environment:
            MYSQL_RANDOM_ROOT_PASSWORD: "1"
            MYSQL_DATABASE: "dolibarr"
            MYSQL_USER_FILE: "/run/secrets/mysql-user"
            MYSQL_PASSWORD_FILE: "/run/secrets/mysql-password"
        networks:
            - backend
            - dbgateway
       volumes:
           - ./data:/var/lib/mysql
           - ./backup:/backup/mysql

    web:
        image: tuxgasy/dolibarr:latest
        secrets:
            - mysql-user
            - mysql-password
        depends_on:
            - mariadb
        environment:
            DOLI_DB_USER_FILE: "/run/secrets/mysql-user"
            DOLI_DB_PASSWORD_FILE: "/run/secrets/mysql-password"
            DOLI_ADMIN_LOGIN: "username"
            DOLI_ADMIN_PASSWORD: "supersecretpassword"
            DOLI_DB_HOST: mariadb
            DOLI_DB_NAME: "dolibarr"
            DOLI_URL_ROOT: 'https://dolibarr.myhostname.com'
            PHP_INI_DATE_TIMEZONE: 'America/Chicago'
        labels:
            - "traefik.enable=true"
            - "traefik.docker.network=traefik"
            - "traefik.http.routers.dolibarr.tls=true"
            - "traefik.http.routers.dolibarr.rule=Host(`dolibarr.myhostname.com`)"
            - "traefik.http.routers.dolibarr.entrypoints=websecure"
            - "traefik.http.services.dolibarr.loadbalancer.server.port=80"
            - "traefik.http.services.dolibarr.loadbalancer.server.scheme=http"
        networks:
            - webgateway
            - backend

What I expect:
backend network facilitates communication between the web and mariadb containers, mariadb is accessible to other internal services (automated backup/admin) via dbgateway. The webgateway provides web with access to the reverse proxy. All is well.

What Happens:
web and mariadb communicate across the backend network just fine - but apache usually ignores webgateway entirely. It isn't consistent, it sometimes works on webgateway then chooses a different adapter after a restart. In the logs this is usually seen:
web_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.208.3. Set the 'ServerName' directive globally to suppress this message - it's clearly using the backend network in this instance.

Workaround:
While the workaround is to simply not use a private backend network to talk to the db, it's less convenient for my use case, and certainly a bug. I expect apache to listen on all interfaces, or allow me to specify which interface to listen on, I don't see a way to force apache to bind/listen on all adapters/0,0,0,0

Using Docker Swarm

Hello,

I'm trying the image using docker swarm. Here is my command line for creating a service. (I created a database before it)

docker service create --replicas 2 -d --name "Dolibarr_swarm" -e DOLI_DB_HOST="PUBLIC_IP" -e DOLI_DB_USER="user" -e DOLI_DB_PASSWORD="password" -e DOLI_DB_NAME="dolibarr" -e DOLI_ADMIN_LOGIN="admin" -e DOLI_ADMIN_PASSWORD="password" -e PHP_INI_DATE_TIMEZONE='Europe/Paris' -p 80 tuxgasy/dolibarr:latest

Here is what I'm having :

ID                  NAME                IMAGE                     NODE                DESIRED STATE       CURRENT STATE            ERROR               PORTS
8aodq4b4j0r0        Dolibarr_swarm.1    tuxgasy/dolibarr:latest   worker         Running             Running 25 minutes ago

And If I ado a docker ps -a


CONTAINER ID        IMAGE                                                                                      COMMAND             CREATED             STATUS              PORTS                                                                        NAMES
101ac4cjca5e        tuxgasy/dolibarr@sha256:c2a6c1e1ed7844a5bc74dc2fdd1d27a1dea843b59917d17a617a12e129a06642   "docker-run.sh"     25 minutes ago      Up 25 minutes       80/tcp 

And if I inspect for the published port :

 docker service inspect f1tkeah11hw6skr4qcb91kabc | grep Port
                "Ports": [
                        "TargetPort": 80,
                "Ports": [
                        "TargetPort": 80,
            "Ports": [
                    "TargetPort": 80,
                    "PublishedPort": 30000,

I can't access dolibarr using port 30000

Here is the logs :

[INIT] => update PHP Config ...
[INIT] => update Dolibarr Config ...
[INIT] => update ownership for file in Dolibarr Config ...
[INIT] => update ownership for files in /var/www/documents ...
Current Version is : 12.0.2
Last installed Version is : 12.0.2
Schema update is not required ... Enjoy !!
AH00557: apache2: apr_sockaddr_info_get() failed for a151a8f8b4f7
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
AH00557: apache2: apr_sockaddr_info_get() failed for a151a8f8b4f7
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Fri Aug 21 13:49:59.777959 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.8 configured -- resuming normal operations
[Fri Aug 21 13:49:59.781506 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Env DOLI_DB_HOST doesn't like domain names

Hello maintainer :)

It's not a deal breaker, but I've noticed that the env doesn't likes domain names. It didn't even reach my DNS server to resolve it.
Noticed it as the DB was 0B and the log was stuck on "waiting for sql db to be up" or similar.

As soon as I redeployed it with the ip address it worked flawlessly.
Thanks for you labor :)

Regards,
Alan.

Wrong page after login

Hello tuxgasy, first of all good work!
Second, well I have a problem, I have everything configured, but when I login to Dolibarr it gets me to the wrong page.
I login in:
https://some.server.com/dolibarr/
(because I have several other containers)
but it gets me to:
https://some.server.com/index.php?mainmenu=home
(if I send a POST with the credentials to https://some.server.com/dolibarr/index.php?mainmenu=home it logs me and everything works like a charm)

my docker-compose file is:
`version: '3'

services:
dolibarr:
image: tuxgasy/dolibarr
container_name: dolibarr
depends_on:
- mysql
- traefik
labels:
- "traefik.enable=true"
- "traefik.backend=dolibarr"
- "traefik.dolibarr.frontend.rule=Host:${SUBDOMAIN}.${DOMAIN_NAME}.${DOMAIN_TLD};PathPrefixStrip:/${DOLIBARR_PATH}"
environment:
- DOLI_DB_HOST=mysql
- DOLI_DB_USER=${MYSQL_ADD_DOLIBARR}
- DOLI_DB_PASSWORD=${ADMIN_PASSWORD}
- DOLI_DB_NAME=${MYSQL_ADD_DOLIBARR}
- DOLI_ADMIN_LOGIN=root
- DOLI_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- DOLI_URL_ROOT=https://${SUBDOMAIN}.${DOMAIN_NAME}.${DOMAIN_TLD}/${DOLIBARR_PATH}
- PHP_INI_DATE_TIMEZONE='Continent/Country'
links:
- mysql
mysql:
environment:
- MYSQL_ADD_DOLIBARR=${MYSQL_ADD_DOLIBARR}
`
Thanks for your time!

Peristent Data

I am trying to mount the volumes for persistence:
version: "3"
services:
mariadb:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr
restart: always
volumes:
- ./db:/var/lib/mysql
web:
image: tuxgasy/dolibarr
environment:
DOLI_DB_HOST: mariadb
DOLI_DB_USER: root
DOLI_DB_PASSWORD: root
DOLI_DB_NAME: dolibarr
DOLI_URL_ROOT: 'http://0.0.0.0'
links:
- mariadb
volumes:
- ./dolibarr_html:/var/www/html
- ./dolibarr_docs:/var/www/documents

The directory of dolibarr_html / dolibarr_docs is empty and if I try to connect to http://0.0.0.0 the log says the following:

web_1 | [Fri Aug 20 08:05:22.906246 2021] [autoindex:error] [pid 61] [client 172.24.0.2:33478] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive`

Long "chown" process on startup

Hi,
thank you for this docker image. I was able to spin it up successfully.
But on every docker start there is a looong "chown" process running on the dolibarr container blocking the startup process, which now takes 10-15 minutes.. Killing the process leads to maria_db database not starting properly.
Can I avoid this chown?
Thank you!
Filip.

mysql Help.

Even though the db has initialized correctly, docker logs shows

Waiting that SQL database is up ...

Probably a docker container-networking trouble. This is the docker-compose file I'm running:

networks:
    internal-pod:
        internal: true
    external-pod:
        internal: false

 services:
    web:
        image: tuxgasy/dolibarr
        environment:
            DOLI_DB_HOST: 172.29.0.2:3306
            DOLI_DB_USER: root
            DOLI_DB_PASSWORD: root
            DOLI_DB_NAME: dolibarr
            DOLI_URL_ROOT: 'localhost'
            PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
        ports:
            - "80:80"
        links:
            - mysql

    mysql:
        image: mysql:8
        restart: always
        environment:
            MYSQL_DATABASE: dolibarr
            MYSQL_USER: root
            MYSQL_PASSWORD: root
            MYSQL_RANDOM_ROOT_PASSWORD: '1'
        volumes:
            - mysql:/Users/rodri/Documents/5sites/testing/db
        cap_add:
            - SYS_NICE

When I run the main docker-compose.yml with Maria db it works ok.

Access MariaDB on host

Hello,

I'm tryng setting the dolibarr container access on my host machine mariadb.

I tried the following :

docker run -d --name dolibarr -e DOLI_DB_HOST="host.docker.internal" -e DOLI_DB_USER="root" -e DOLI_DB_PASSWORD="PASS" -e DOLI_DB_NAME="dolibarr" -e DOLI_URL_ROOT="http://MYIP" -e PHP_INI_DATE_TIMEZONE='Europe/Paris' -p 8082:80 tuxgasy/dolibarr
docker run -d --name dolibarr -e DOLI_DB_HOST="172.17.0.1:3306" -e DOLI_DB_USER="root" -e DOLI_DB_PASSWORD="PASS" -e DOLI_DB_NAME="dolibarr" -e DOLI_URL_ROOT="http://MYIP" -e PHP_INI_DATE_TIMEZONE='Europe/Paris' -p 8082:80 tuxgasy/dolibarr
docker run -d --name dolibarr --net=host -e DOLI_DB_HOST="localhost" -e DOLI_DB_USER="root" -e DOLI_DB_PASSWORD="PASS" -e DOLI_DB_NAME="dolibarr" -e DOLI_URL_ROOT="http://MYIP" -e PHP_INI_DATE_TIMEZONE='Europe/Paris' -p 8082:80 tuxgasy/dolibarr

Result :

eab8561987b1        tuxgasy/dolibarr           "docker-run.sh"     4 minutes ago       Up 4 minutes        0.0.0.0:8082->80/tcp                                                         dolibarr

I once got the following error :

Waiting that SQL database is up...

and

usermod: no changes

Upgrade de la version du container

Bonjour,
Est-ce possible de faire une Maj de la version du dolibarr installée dans le container?

J'ai vu le script update.sh, mais j'ai plus l'impression que c'est pour faire un update des versions installables.

Merci d'avance!

Problem expose volumes

Bonjour, merci pour votre travail tout d'abord.
Je voudrais dans un docker-compose exposé le volume /var/www de votre conteneur, mais lors de la mise en 'UP' de la composition, celui-ci me sort une erreur et ne veut donc pas démarrer.
Auriez vous une astuce à me conseiller pour effectuer cela ?

Merci d'avance.

Kubernetes deployment

Hello,

I'm trying to deploy a container managed by Kubernetes (hosted by OVH). I have some troubles to use your image as I want.

So first, I can start containers (which one with mariaDB, and the other one based on your image). It works perfectly. However, I absolutly need to mention volumes to keep my data and make them persistent. For this, I'm trying to mount /var/www/html (in the dolibarr's container) and /var/lib/mysql (in the MariaDB's container) and after that, I can't start anything.

For the MariaDB's issue, I can dodge it by using MySQL, however Dolibarr don't see the Database (returning the message : Waiting that SQL database is up). I saw in an other "issues section" that I need to use the command --default-authentication-plugin=mysql_native_password. The problem is that I don't know how to setup that in a YAML configuration file designed for Kubernetes.

And finaly, when I specify the volume mount /var/www/html on the Dolibarr's container (with MariaDB without volume to start this container), the WEB page returns :
You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe

I hope you could help me.

Best regards.

Access denied

Sorry, I can't solve this problem. The mariadb container log is filled with "[Warning] Access denied for user 'doli'@'172.25.0.3' (using password: YES)" messages. Full log in attachment.
I use my own server and created a stack using Portainer with your yalm file. See my docker-
compose file in attachment. Dolibarr&Maria_db_yml.txt
mariadb.txt

docker-compose file

Hi, I have the following problem:

I only created the docker-compose file on a test server. I copied nothing else there. (should I?)

When I try to run your docker-compose up I get this error:

root@dolibarr:/home# docker-compose up

ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
in "./docker-compose.yml", line 14, column 28

I am using Docker version 17.12.0-ce

Is it possible, that the syntax is wrong?

Thanks :-)

Should use at least PHP 7.0 not 5.6

I reproduced this issue Dolibarr/dolibarr#10091 using the docker image 8.0.4 in this current repo.
Basically the problem is that any process that requires sending an email (expense reports request, validation...) does not work and fails because it cannot send an email.
The error is "Parse error: syntax error, unexpected '?' in /var/www/html/includes/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php on line 496". This is due to PHP 7.0 or above is required by the swift mailer php module.

So you should upgrade the php versions in the docker files. Also for the 9.0.0 dolibarr version.

IMAP function not found

Hello and happy new year!

I'm trying to setup the email collector, but it's presenting the error "IMAP functions not available on your PHPFailed to open IMAP connection".
I have:

  • apt-get update & apt-get upgrade the container.
  • apt-get install php7.3-imap
  • apt-get install php-imap

All without success.
Could you guide me on the solution?

Thanks!

drop support for PHP5 based images

What do you think about it @tuxgasy ?
It will reduce disk usage on docker hub, and also avoid confusion ... PHP 5 is no more supported (could lead to security vulnerability).

Cron logs to stdout

Before sending a fix, I suggest to push cron logs to stdout/stderr of the PID 1 process instead of writing them to a file.

@tuxgasy what do you think ot it? It would allow to use the docker logs command

docker-compose-link not found

Hello everyone, just to know. Am I the only one who needs to change docker-compose-link to images folder (after settings env vars) to get the docker-compose to work?
I'm new to dolibarr, I'v already heard about it and wanted to test it but I'm also facing another error at first connexion, the default credentials. I've tried all credentials given on README and more but can't get logged in. Am I doing anything wrong? I followed the the steps (export env versons vars, run docker-compose up but I had to change the images folder as I said).

Thanks in advance for your advices

use bcrypt instead of md5

pass_crypted=`echo -n ${DOLI_ADMIN_PASSWORD} | md5sum | awk '{print $1}'`
mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} ${DOLI_DB_NAME} -e "INSERT INTO llx_user (entity, login, pass_crypted, lastname, admin, statut) VALUES (0, '${DOLI_ADMIN_LOGIN}', '${pass_crypted}', 'SuperAdmin', 1, 1);" > /dev/null 2>&1

ARM build

Hello!

First of all, Thank you for the work.

I try to run on an orange pi lite 2 today and I'm facing a issue. The SQL conatiner work fine but the dolibarr one won't start.
I use d your compose with secret example with 15.0.1-php7.4 tag. The error is "standard_init_linux.go:228: exec user process caused: exec format error". I read some stuff about a portage of the work made by Monogramm at this link [https://github.com/Monogramm/docker-dolibarr/issues/54].
Can you tell me if you have make some change related to that thread in your repo pls. I don't know if it's a bug or if it just have not be implemented yet. If not, do you plan to it and info in the linked thread still be valable?

Bye

Postgres support

Hi,
is it possible to use postgres as DB?
I've one already running for other services and dolibarr supports it natively.
If I initialize de DB myself is it possible to run with the current docker image or some modification is needed?

Thank you and regardsbest !

Add SOAP php extension

Need install libxml2-dev :

apt-get install libxml2-dev

Then install the extension:

docker-php-ext-install soap

http://0.0.0.0/ displays just “It works”

Thanks for providing this Docker image for Dolibarr!

I followed scrupulously your instructions and first faced the following error:

$ docker-compose up -d
Creating network "dolibarr_default" with the default driver
Pulling mariadb (mariadb:latest)...
latest: Pulling from library/mariadb
405f018f9d1d: Pull complete
7a85079b8234: Pull complete
579c7ff691b1: Pull complete
4976663b5d6d: Pull complete
169024b1fb13: Pull complete
c0ffe8ce897f: Pull complete
b583c09d23c3: Pull complete
9b9f0c08d08f: Pull complete
9cd51f984586: Pull complete
d9f506bb8aca: Pull complete
24d689f79ba4: Pull complete
Digest: sha256:88fcb7d92c7f61cd885c4d309c98461f3607aa6dbd57a2474be86e1956b36d13
Status: Downloaded newer image for mariadb:latest
Pulling web (tuxgasy/dolibarr:)...
latest: Pulling from tuxgasy/dolibarr
c32ce6654453: Pull complete
f244825368f6: Pull complete
0cb682e3d268: Pull complete
eea16ce02660: Pull complete
ca5b7334d364: Pull complete
ecbba56d4063: Pull complete
3822be6520ec: Pull complete
41c523c319c9: Pull complete
dd95c10f64f7: Pull complete
5f82f352ea51: Pull complete
fd46f7727d7b: Pull complete
34450d986a45: Pull complete
c398811107d9: Pull complete
2cd2a3698cea: Pull complete
ee34b1df1b48: Pull complete
8fdb6897cd86: Pull complete
6d58bd679f1f: Pull complete
Digest: sha256:7c7788bf2bc19f565fdb66103ddf8893a935e8ffe14e63d337ed758f75af1c37
Status: Downloaded newer image for tuxgasy/dolibarr:latest
Creating dolibarr_mariadb_1 ... done
Creating dolibarr_web_1     ... 
Creating dolibarr_web_1     ... error

ERROR: for dolibarr_web_1  Cannot start service web: driver failed programming external connectivity on
endpoint dolibarr_web_1 (443bedb8604371044a0be08ce1950aedaaf3d7d78572af356d23e16abacaf029):
Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use

ERROR: for web  Cannot start service web: driver failed programming external connectivity on endpoint
dolibarr_web_1
(443bedb8604371044a0be08ce1950aedaaf3d7d78572af356d23e16abacaf029): Error starting userland proxy:
listen tcp4
0.0.0.0:80: bind: address already in use
Encountered errors while bringing up the project.

I managed by stopping the httpd service on my Linux box (Mageia 8) and retrying:

$ docker-compose up -d      
dolibarr_mariadb_1 is up-to-date
Recreating dolibarr_web_1 ... done

But, now, when I visit http://0.0.0.0/, it displays just “It works” instead to bring me to the new Dolibarr installation. I tried to visit http://0.0.0.0/dolibarr but it doesn't exist.

Thanks in advance for any hint.

How to update using CLI

Hello,

I'm trying to update my Dolibarr using CLI. I have a small question about it. I know I have to run the script upgrade.php, upgrade2.php, step5.php for upgrading. For exemple I want to go from version 6.0.8 and install the latest version (12.0.1). I know I have to make 6 to 7, 7 to 8, 8 to 9, 9 to 10, 10 to 11 and 11 to 12. But do I have to use :

php upgrade.php 6.0.8 7.0.0

or

php upgrade.php 6.0.0 7.0.0

And on the last step

php upgrade.php 11.0.0 12.0.2

or

php upgrade.php 11.0.0 12.0.0

In the doc, it says that z must be 0 but I don't know if oldz must be 0 too

https://wiki.dolibarr.org/index.php/Installation_-_Upgrade

Thanks for any help

How to update Dolibarr with cli

Hey,
I'm creating a container with for eg Dolibarr 9.0.4 using a persistent volume for documents and custom folder. I'm also using an external database.
Then I'm stopping the container and deleting it. I recreate it with the same attribute but using the tag last.
Now I need to upgrade it. I deleted the file install.lock in the documents folder.
Then I need to run the following script (https://wiki.dolibarr.org/index.php/Installation_-_Upgrade):

  • upgrade.php
  • upgrade2.php
  • step5.php

When I execute the first script as following :

 docker exec -it dolibarr php /var/www/htdocs/install/upgrade.php 9.0.4 10.0.0

I'm getting the following error :

PHP Warning: require_once(../filefunc.inc.php): failed to open stream: No such file or directory in /var/www/html/install/inc.php on line 31
PHP Fatal error: require_once(): Failed opening required '../filefunc.inc.php' (include_path='.:/usr/local/lib/php') in /var/www/html/install/inc.php on line 31

Same happened if I use the folder html instead of htdocs

It's working fine If I upgrade through the browser

Build error libpng12-dev

Hi,

I have a build error :

`Package libpng12-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libpng12-dev' has no installation candidate
ERROR: Service 'dolibarr' failed to build: The command '/bin/sh -c apt-get update -q && apt-get upgrade -yq && apt-get install -yq libpng12-dev libjpeg-dev libxml2-dev mysql-client unzip && rm -rf /var/lib/apt/lists/* && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr && docker-php-ext-install mysqli pdo pdo_mysql gd soap zip' returned a non-zero code: 100`

Difference between htdocs and html

Hello,
I'm trying to create a volume for the dolibarr files. I entered the container and saw two path.

  • /var/www/html
  • /var/www/htdocs

Which one should I use for the volume ?

htdocs volume

Bonjour sais tu s'il te plait comment faire pour mettre le dossier /var/ww dans un autre dossier dans docker?

car je n'arrive pas avec:
volumes:
- /srv/dockers/web/compta/www:/var/www

j'ai toujours des erreurs.

Merci
V

HTTPS support?

Hi, this is not really an issue but I was wondering if HTTPS support was possible with this Docker image?
I can't find any information out there (plus default URL refers to http://...).

Thanks!

migration from real server to docker

Bonjour et merci pour ton travail.
Pour migrer une version depuis un vrais serveur vers la version docker tu pense que c'est possible juste d'importer la base de données et faire une MAJ?

Merci

There is a DOLI_DB_HOST_PORT ?

Hi,

I'm trying to use this docker image. Everything works well on first use.

But now i'm trying to migrate db dump and documents from standalone dolibarr V8 old instance.

My containers are launched and run but dolibarr app can't connect to mysql db.

i'm getting this error: | Waiting that SQL database is up ...

My docker-compose.yml:

version: "3.4"
services:
    db:
        image: mysql
        command: --default-authentication-plugin=mysql_native_password
        restart: always
        env_file: .env
        environment:
            MYSQL_DATABASE: ${MYSQL_DATABSE}
            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
        volumes:
            - ./data:/var/lib/mysql
#            - ./mysqldump/mysqldump.sql:/docker-entrypoint-initdb.d
        ports:
            - "${MYSQL_HOST_PORT:-3306}:3306"
        networks:
            - net
    app:
        image: tuxgasy/dolibarr
        restart: always
        env_file: .env
        environment:
#            DOLI_DB_HOST: db:${MYSQL_HOST_PORT:-3306}
            DOLI_DB_HOST: db
            DOLI_DB_USER: ${MYSQL_USER_DOLIBARR}
            DOLI_DB_PASSWORD: ${MYSQL_PWD_DOLIBARR}
            DOLI_DB_NAME: ${MYSQL_DATABSE}
            DOLI_URL_ROOT: 'https://dolibarr2.greenponik.com'
            PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
            DOLI_INSTALL_AUTO: 1
        volumes:
            - ./logs/:/var/logs/
        ports:
            - "8080:80"
        depends_on:
            - db
        networks:
            - net
networks:
    net:

inside my .env:

MYSQL_HOST_PORT=33061

i don't know if it's possible to change DOLI_DB_HOST port because on my server a local mysql instance is running and already use port: 3306

I tried to force port on DOLI_DB_HOST: db:33061 but no success

Php function `easter_date` is missing

  1. docker-compose up -d with the given docker-compose.yml file
  2. login as admin/admin
  3. setup organisation name and county
  4. activate Leave Request Management
  5. go to HRM/New to create a New leave request, fill all fields
  6. click the button CREATE LEAVE REQUEST

I obtain the following error:

Fatal error: Uncaught Error: Call to undefined function easter_date() in /var/www/html/core/lib/date.lib.php:711 Stack trace: #0 /var/www/html/core/lib/date.lib.php(899): num_public_holiday(1590969600, 1593129600, 'FR', 1) #1 /var/www/html/holiday/card.php(189): num_open_day(1590969600, 1593129600, 0, 1, 0) #2 {main} thrown in /var/www/html/core/lib/date.lib.php on line 711

Tried with tags: latest, 11.0.3-php7.1 and 11.0.3-php7.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.