i had a problem with a dockerized SuiteCRM 8.6 fresh installation that return everytime i try to rebuild the cache from user interface:
PHP Fatal error: Uncaught RuntimeException: Unable to create the Doctrine Proxy directory "/bitnami/suitecrm/cache/prod/doctrine/orm/Proxies".
After too many days of testing i realized that the problem seems to be related to a incompatibility between SuiteCRM (Symphony) and Docker's bind mount.
I have tested in different ways:
Permissions and file ownership are double-checked. Keep in mind that cache rebuilding from UI is started by apache user (www-data), and file ownership and group is www-data:www-data.
The problem is present everytime i work with docker's bind mount, but strangely works perfectly if i try with bitnami official release without bind mount. If i set bind mount in this installation, the problem occurs again.
I have asked for help on Official Support Forum here and GitHub with no luck.
Anyone have an idea about how solve this problem?
Thanks in advance.
Edit, i give you some extra information.
My Dockerfile:
FROM ubuntu:24.04
ARG USER_ID=1000
ENV TZ=Europe/Rome
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update
RUN apt -y upgrade
RUN apt-get install vim -y
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get install apache2 -y
RUN apt -y install ca-certificates apt-transport-https software-properties-common
RUN add-apt-repository ppa:ondrej/php
RUN apt-get -y update
RUN apt-get install -y php8.2 libapache2-mod-php8.2
RUN apt-get install -y php8.2-fpm libapache2-mod-fcgid
RUN apt-get install -y php8.2-mysql
RUN apt-get install -y php8.2-curl php8.2-intl php8.2-zip php8.2-imap php8.2-gd
RUN apt-get install -y slapd ldap-utils php-ldap php8.2-ldap php8.2-soap
RUN apt-get install -y php8.2-xdebug
RUN apt install -y php8.2-xml php8.2-mbstring
RUN apt install -y zlib1g-dev libxml2-dev
RUN apt-get update && apt-get install -y \
gnupg \
g++ \
procps \
openssl \
git \
unzip \
libzip-dev \
libfreetype6-dev \
libpng-dev \
libjpeg-dev \
libicu-dev \
libonig-dev \
libxslt1-dev \
acl \
&& echo 'alias sf="php bin/console"' >> ~/.bashrc
RUN a2enmod rewrite
RUN a2enconf php8.2-fpm
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y nodejs \
npm
RUN npm install -g @angular/cli
RUN npm install --global yarn
RUN usermod -u ${USER_ID} www-data
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
CMD ["apachectl", "-D", "FOREGROUND"]
EXPOSE 80
EXPOSE 9000
My docker-compose.yml
services:
suitecrm:
container_name: suitecrm-mca
build: .
networks:
- suitecrm_net
volumes:
#SuiteCRM Application Folder
- ./www:/var/www/html:delegated
#PHP config
- ./docker/config/php/php.ini:/etc/php/8.2/apache2/php.ini
- ./docker/config/php/php.ini:/etc/php/8.2/cli/php.ini
#APACHE config
- ./docker/config/apache/sites.conf:/etc/apache2/sites-enabled/sites.conf
#APACHE Log Folder
- ./logs/apache:/var/log/apache2/
#PHP Log Folder
- ./logs/php:/var/log/php/
#PHP Log Folder
- ./logs/xdebug:/tmp/
#XDebug settings
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
ports:
- "80:80"
mysql:
container_name: mysql-mca
image: mysql:8.0
ports:
- "3306:3306"
env_file: .env
environment:
- MYSQL_ROOT_PASSWORD=suitecrm
- MYSQL_USER=suitecrm
- MYSQL_PASSWORD=suitecrm
- MYSQL_DATABASE=suitecrm
volumes:
- ./docker/data/mysql:/var/lib/mysql:delegated
networks:
- suitecrm_net
networks:
suitecrm_net:
driver: bridge
Solution is “to esclude” /cache folder from docker-compose.yml bind mount like below:
services:
suitecrm:
container_name: suitecrm
build: .
volumes:
#SuiteCRM Application Folder
- ./www:/var/www/html:delegated
- /var/www/html/cache/ #Anonymous volume inside the existing one
In this way cache subfolder can re-create proxy classes on rebuild and repair.
Thanks.