Docker problems with 9.1.8

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamie
    Junior Member
    • Aug 2025
    • 14

    #1

    Docker problems with 9.1.8

    After recently upgrading to 9.1.8 in hopes of getting docker working for internal development i am running into this problem, docker seems working fine and the same code is working well on our production server

    Thanks
    Jamie


    Fatal error: Uncaught Error: Class "Espo\Binding" not found in /var/www/html/application/Espo/Core/Binding/EspoBindingLoader.php:50 Stack trace: #0 /var/www/html/application/Espo/Core/Container/ContainerBuilder.php(197): Espo\Core\Binding\EspoBindingLoader->load() #1 /var/www/html/application/Espo/Core/Application.php(62): Espo\Core\Container\ContainerBuilder->build() #2 /var/www/html/application/Espo/Core/Application.php(54): Espo\Core\Application->initContainer() #3 /var/www/html/public/index.php(36): Espo\Core\Application->__construct() #4 {main} thrown in /var/www/html/application/Espo/Core/Binding/EspoBindingLoader.php on line 50

    my dockerfile

    # EspoCRM Dockerfile
    # Use official PHP image with Apache
    FROM php:8.3-apache
    # Install system dependencies
    RUN apt-get update && apt-get install -y \
    libpng-dev \
    libjpeg-dev \
    libfreetype6-dev \
    libzip-dev \
    unzip \
    git \
    && docker-php-ext-configure gd --with-freetype --with-jpeg \
    && docker-php-ext-install gd zip pdo pdo_mysql
    # Enable Apache mod_rewrite
    RUN a2enmod rewrite
    # Set working directory
    WORKDIR /var/www/html
    # Copy project files
    COPY . /var/www/html/
    # Copy custom Apache config
    COPY espocrm.conf /etc/apache2/sites-available/espocrm.conf
    # Enable site (do not reload Apache during build)
    RUN a2dissite 000-default.conf \
    && a2ensite espocrm.conf
    # Set permissions
    RUN chown -R www-data:www-data /var/www/html \
    && chmod -R 755 /var/www/html
    # Expose port 80
    EXPOSE 80
    # Healthcheck (optional)
    HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD curl -f http://localhost/ || exit 1
    # Start Apache
    CMD ["apache2-foreground"]


    the docker-compose.yml

    services:
    espocrm:
    build: .
    container_name: espocrm_app
    ports:
    - "8080:80"
    depends_on:
    - db
    environment:
    - DB_HOST=db
    - DB_NAME=espocrm
    - DB_USER=espocrm
    - DB_PASSWORD=espocrm_pass
    volumes:
    - ./:/var/www/html/
    restart: unless-stopped
    db:
    image: mysql:8.0
    container_name: espocrm_db
    environment:
    MYSQL_ROOT_PASSWORD: root_pass
    MYSQL_DATABASE: espocrm
    MYSQL_USER: espocrm
    MYSQL_PASSWORD: espocrm_pass
    volumes:
    - db_data:/var/lib/mysql
    restart: unless-stopped
    volumes:
    db_data:​
  • lazovic
    Super Moderator
    • Jan 2022
    • 1139

    #2
    Hi jamie,

    Please check if this class is used in your customizations. In the new version of EspoCRM it may not exist anymore.

    Comment

    • jamie
      Junior Member
      • Aug 2025
      • 14

      #3
      Hi @Iazovic

      No we haven't customized anything there and they seem like core classes, this is also exclusively todo with setting up a docker environment

      as the code is working on the server

      Comment

      • jamie
        Junior Member
        • Aug 2025
        • 14

        #4
        ahh was a problem in my .yml file, replacing it with yours works

        thanks

        Comment

        • jamie
          Junior Member
          • Aug 2025
          • 14

          #5
          no sorry it seems that yes it is a problem, i switched to yours but then i was using your code and had no way to edit it

          so i am still getting this error and it seems tobe something in the core, do you guys not allow us to run a development environment?


          Fatal error: Uncaught Error: Class "Espo\Binding" not found in /var/www/html/application/Espo/Core/Binding/EspoBindingLoader.php:50 Stack trace: #0 /var/www/html/application/Espo/Core/Container/ContainerBuilder.php(197): Espo\Core\Binding\EspoBindingLoader->load() #1 /var/www/html/application/Espo/Core/Application.php(62): Espo\Core\Container\ContainerBuilder->build() #2 /var/www/html/application/Espo/Core/Application.php(54): Espo\Core\Application->initContainer() #3 /var/www/html/public/index.php(36): Espo\Core\Application->__construct() #4 {main} thrown in /var/www/html/application/Espo/Core/Binding/EspoBindingLoader.php on line 50

          Comment

          Working...