feat: SugarCRM 6.5.26 CE - Docker + compose + CI/CD
Some checks failed
Docker Build & Push SugarCRM 6.5 CE / build-and-push (push) Has been cancelled

- PHP 5.6 Apache Dockerfile (Debian Jessie, archive repos)
- Source from bklein01/sugarcrm GitHub mirror
- MySQL 5.7 database with healthcheck
- Silent install via init.sh (AdminWizard disabled)
- REST v4.1 API test script (test_api.py)
- Gitea Actions CI/CD for registry push
- Full README with API docs and pitfall notes
This commit is contained in:
root
2026-05-24 14:33:08 +02:00
parent 30905b15d4
commit 1c4a366409
14 changed files with 576 additions and 334 deletions

View File

@@ -1,96 +1,52 @@
# SuiteCRM 7.15.1 - PHP 8.1 + Apache
FROM php:8.1-apache
FROM php:5.6-apache-jessie
LABEL maintainer="Kevin Gessner"
LABEL description="SuiteCRM 7.15.1 containerized with PHP 8.1 and Apache"
ENV MAJOR_VERSION=6.5
ENV MINOR_VERSION=26
ENV WWW_FOLDER=/var/www/html
ENV DEBIAN_FRONTEND=noninteractive
ENV SUGARCRM_REPO=https://github.com/bklein01/sugarcrm
ENV SUGARCRM_COMMIT=71125a3
# Install system dependencies and PHP extensions
RUN set -eux; \
apt-get update && apt-get install -y --no-install-recommends \
# Core
libzip-dev \
# Jessie is EOL - switch to archive.debian.org
RUN echo "deb http://archive.debian.org/debian/ jessie main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list && \
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid-until && \
apt-get update -o Acquire::Check-Valid-Until=false && apt-get upgrade -y --force-yes && \
apt-get install -y --force-yes \
libcurl4-gnutls-dev \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libonig-dev \
libxml2-dev \
libldap2-dev \
unzip \
cron \
re2c \
python \
curl \
libc-client-dev \
libkrb5-dev \
libcurl4-openssl-dev \
libicu-dev \
# Utils
unzip \
wget \
curl \
cron \
msmtp \
# Cleanup
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install -j$(nproc) \
pdo \
pdo_mysql \
mysqli \
gd \
mbstring \
zip \
xml \
curl \
ldap \
imap \
intl \
calendar \
opcache \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
git \
&& rm -r /var/lib/apt/lists/*
# Configure PHP for SuiteCRM
RUN { \
echo 'memory_limit = 512M'; \
echo 'upload_max_filesize = 64M'; \
echo 'post_max_size = 64M'; \
echo 'max_execution_time = 600'; \
echo 'max_input_time = 600'; \
echo 'display_errors = Off'; \
echo 'log_errors = On'; \
echo 'date.timezone = Europe/Berlin'; \
} > /usr/local/etc/php/conf.d/suitecrm.ini
# Clone SugarCRM 6.5.26 CE from GitHub mirror
RUN git clone --depth 1 ${SUGARCRM_REPO} ${WWW_FOLDER} \
&& cd ${WWW_FOLDER} && git checkout ${SUGARCRM_COMMIT} 2>/dev/null || true \
&& rm -rf ${WWW_FOLDER}/.git \
&& chown -R www-data:www-data ${WWW_FOLDER}
# Configure OPcache
RUN { \
echo 'opcache.memory_consumption=256'; \
echo 'opcache.interned_strings_buffer=16'; \
echo 'opcache.max_accelerated_files=20000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
# PHP upload limits
COPY docker-php-ext-filesize.ini /usr/local/etc/php/conf.d/docker-php-ext-filesize.ini
# SuiteCRM version
ENV SUITECRM_VERSION=7.15.1
ENV SUITECRM_SHA256=468b811addd21dfb29d411ee6e815dbdf7099f912347e88cd3e8d010d829db7a
# PHP extensions
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install imap mysql zip gd
# Download and extract SuiteCRM
RUN set -eux; \
wget -q "https://github.com/salesagility/SuiteCRM/releases/download/v${SUITECRM_VERSION}/SuiteCRM-${SUITECRM_VERSION}.zip" \
-O /tmp/suitecrm.zip; \
echo "${SUITECRM_SHA256} /tmp/suitecrm.zip" | sha256sum -c -; \
unzip -q /tmp/suitecrm.zip -d /var/www/html/; \
rm /tmp/suitecrm.zip; \
chown -R www-data:www-data /var/www/html
# Copy entrypoint and templates
COPY config_override.php.pyt /usr/local/src/config_override.php.pyt
COPY envtemplate.py /usr/local/bin/envtemplate.py
COPY init.sh /usr/local/bin/init.sh
RUN chmod u+x /usr/local/bin/init.sh
# Apache configuration
RUN a2enmod rewrite expires headers
COPY apache-suitecrm.conf /etc/apache2/sites-available/000-default.conf
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
WORKDIR /var/www/html
VOLUME ["/var/www/html/upload", "/var/www/html/custom", "/var/www/html/config_override.php"]
# Cron
COPY crons.conf /root/crons.conf
RUN crontab /root/crons.conf
EXPOSE 80
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]
ENTRYPOINT ["/usr/local/bin/init.sh"]