Dockerfile - test benchmark

Hi everybody!
Thank you all for your precious work!
I guess it will be very useful to publish a Dockerfile (benchmark dockerfile) for testing purpose Suitecrm.
Too much time we spend to trace versions … when we have some problem.

I have one, but I am a pretty young suitecrm user/admin.

Is there a way to have a “benchmark” dockerfile?

Have a look at this (abandoned) work in progress

VMWare works fine in Bitnami rep has a dockerized suitecrm 8.2.1. Good Work!
I only guess for testing pupose the standard LAMP docker env, not the dockerized suiteCRM (I think Bitnami is enough).

BITNAMI dockerized SuiteCRM

Thank you!

Hi Everybody!

After many testing tentatives… I share this PHP dockerfile (7.4) seems minimize error.
I have tested it with 8.2.1 (more stable and fixed than recent 8.2.2 - some bug email account managment):

This is the best medicine for your headache:

FROM php:7.4.33-apache-buster

# Surpresses debconf complaints of trying to install apt packages interactively
# https://github.com/moby/moby/issues/4032#issuecomment-192327844
 
ARG DEBIAN_FRONTEND=noninteractive

# Update
RUN apt-get -y update --fix-missing && \
    apt-get upgrade -y && \
    apt-get --no-install-recommends install -y apt-utils && \
    rm -rf /var/lib/apt/lists/*


# Install useful tools and install important libaries
RUN apt-get -y update && \
    apt-get -y --no-install-recommends install nano wget \
dialog \
libsqlite3-dev \
libsqlite3-0 && \
    apt-get -y --no-install-recommends install default-mysql-client \
zlib1g-dev \
libzip-dev \
libicu-dev && \
    apt-get -y --no-install-recommends install --fix-missing apt-utils \
build-essential \
git \
curl \
libonig-dev && \ 
    apt-get install -y iputils-ping && \
    apt-get -y --no-install-recommends install --fix-missing libcurl4 \
libcurl4-openssl-dev \
zip \
openssl && \
    rm -rf /var/lib/apt/lists/* && \
    curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Install xdebug
RUN pecl install xdebug-3.1.4 && \
    docker-php-ext-enable xdebug && \
    mkdir /var/log/xdebug

# Install redis
RUN pecl install redis-5.1.1 && \
    docker-php-ext-enable redis

# Install imagick
RUN apt-get update && \
    apt-get -y --no-install-recommends install --fix-missing libmagickwand-dev && \
    rm -rf /var/lib/apt/lists/* && \
    pecl install imagick && \
    docker-php-ext-enable imagick

# Other PHP7 Extensions

RUN docker-php-ext-install pdo_mysql && \
    docker-php-ext-install pdo_sqlite && \
    docker-php-ext-install bcmath && \
    docker-php-ext-install mysqli && \
    docker-php-ext-install curl && \
    docker-php-ext-install tokenizer && \
    docker-php-ext-install json && \
    docker-php-ext-install zip && \
    docker-php-ext-install -j$(nproc) intl && \
    docker-php-ext-install mbstring && \
    docker-php-ext-install gettext && \
    docker-php-ext-install calendar && \
    docker-php-ext-install opcache && \
    docker-php-ext-install exif

RUN apt-get -y update && \
	apt-get install -y libxml++2.6-dev && \
	docker-php-ext-install soap
    
RUN apt-get update && apt-get install -y libc-client-dev libkrb5-dev && \
	rm -r /var/lib/apt/lists/* && \
    PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
    && docker-php-ext-install -j$(nproc) imap
    
# Install Freetype 
RUN apt-get -y update && \
    apt-get --no-install-recommends install -y libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev && \
    rm -rf /var/lib/apt/lists/* && \
    docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg && \
    docker-php-ext-install gd

# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

# Enable apache modules
RUN a2enmod rewrite headers

# Cleanup
RUN rm -rf /usr/src/*

If you have some improvement share please and reply.

Also php:8.0.26-apache-buster works fine (even if some problem in email imap managment )

You will probably want to add a few tweaks to php.ini files.

I use default settings for modules charged;
In Php.ini I set:
memory_limit = 512M
post_max_size = 100M
upload_max_filesize = 100M
display_errors = off
session.auto_start = 0

Do you have any suggest?
html_errors = off
error_reporting = E_ALL & ~E_DEPRECATED

I don’t know much about Docker, I’ve only used it lightly, with images built by others.

Isn’t the SuiteCRM installation supposed to go into that build script? And the php.ini changes?