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
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:
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:
Comment