View more context



Hello, any recommendation for CMS color picker?


Would someone be able to explain to me how SilverStripe does it's magic around has_one? I have an ElementalArea that I am trying to map to in a __call magic method, but it seems like method_exists ($this, "ElementalArea") returns false still. It seems like SS is mapping function calls to properties?


Could anyone suggest a good Docker image to use for SilverStripe 4.4?


I use as a base image for my dev environments

Show 1 attachment(s)

Docker - SilverStripe Web - Apache + PHP + xdebug for development environments

Hide attachment content

2 seconds, just upgrading a site from 4.3 to 4.4 so will know shortly 😛


seems to work fine


Do you use image: brettt89/silverstripe-web with a particular tag?


For SS4 sites we use: brettt89/silverstripe-web:7.1-platform


Cool, that's what I was considering using. That doesn't have anything to do with the SilverStripe Platform?


you can see everything it installs here:

Show 1 attachment(s)

FROM php:7.1-apache-jessie
MAINTAINER Brett Tasker "<[email protected]>"
ENV DEBIAN_FRONTEND=noninteractive

# Install components
RUN apt-get update -y && apt-get install -y \
        curl \
        git-core \
        gzip \
        libcurl4-openssl-dev \
        libgd-dev \
        libldap2-dev \
        libmcrypt-dev \
        libtidy-dev \
        libxslt-dev \
        zlib1g-dev \
        libicu-dev \
        g++ \
        openssh-client \
        libmagickwand-dev \
        unzip \
        zip \
    --no-install-recommends && \
    curl -sS <> | php -- /usr/local/bin &amp;&amp; \
    curl -sS <> | php &amp;&amp; mv composer.phar /usr/local/bin/composer &amp;&amp; \
    pecl install xdebug &amp;&amp; \
    pecl install imagick-3.4.3 &amp;&amp; \
    apt-get remove -y libmagickwand-dev &amp;&amp; \
    apt-get install -y libmagickwand-6.q16-2 &amp;&amp; \
    apt-get autoremove -y &amp;&amp; \
    rm -r /var/lib/apt/lists/*

# Install PHP Extensions
RUN docker-php-ext-configure intl &amp;&amp; \
    docker-php-ext-configure mysqli --with-mysqli=mysqlnd &amp;&amp; \
    docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ &amp;&amp; \
    docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ &amp;&amp; \
    docker-php-ext-enable xdebug &amp;&amp; \
    docker-php-ext-enable imagick &amp;&amp; \
    sed -i '1 a xdebug.remote_autostart=true' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_mode=req' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_handler=dbgp' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_connect_back=1 ' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_port=9000' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_host=' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_enable=1' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
    docker-php-ext-install -j$(nproc) \
        intl \
        gd \
        ldap \
        mcrypt \
        mysqli \
        pdo \
        pdo_mysql \
        soap \
        tidy \
        xsl \

# Apache + xdebug configuration
RUN { \
                echo "&lt;VirtualHost *:80&gt;"; \
                echo "  DocumentRoot /var/www/html"; \
                echo "  LogLevel warn"; \
                echo "  ErrorLog /var/log/apache2/error.log"; \
                echo "  CustomLog /var/log/apache2/access.log combined"; \
                echo "  ServerSignature Off"; \
                echo "  &lt;Directory /var/www/html&gt;"; \
                echo "    Options +FollowSymLinks"; \
                echo "    Options -ExecCGI -Includes -Indexes"; \
                echo "    AllowOverride all"; \
                echo; \
                echo "    Require all granted"; \
                echo "  &lt;/Directory&gt;"; \
                echo "  &lt;LocationMatch assets/&gt;"; \
                echo "    php_flag engine off"; \
                echo "  &lt;/LocationMatch&gt;"; \
                echo; \
                echo "  IncludeOptional sites-available/000-default.local*"; \
                echo "&lt;/VirtualHost&gt;"; \
    } | tee /etc/apache2/sites-available/000-default.conf

RUN echo "ServerName localhost" &gt; /etc/apache2/conf-available/fqdn.conf &amp;&amp; \
    echo "date.timezone = Pacific/Auckland" &gt; /usr/local/etc/php/conf.d/timezone.ini &amp;&amp; \
    a2enmod rewrite expires remoteip cgid &amp;&amp; \
    usermod -u 1000 www-data &amp;&amp; \
    usermod -G staff www-data

CMD ["apache2-foreground"]
Hide attachment content

might just be that it installs php extensions that are also available on SilverStripe platform?


Ah yeah, I had the thought it wasn't intrinsically tied the the SilverStripe Platform, but that it get's it set up in line with the platform.


@guttmann do you have your entry point in a public folder? If so, did you do anything in particular to your Dockerfile to get the site loading correctly from the public folder?


one of my sites uses the public folder but I'm relying on the .htaccess one level above the public folder to redirect all requests to public


haven't messed around with the document root yet

Show less replies

nothing changed from 4.3 to 4.4 in terms of why it wouldn’t work

Karan Kumar

Hi Team, In SS3 we could do some thing like [in snippet below] and you could call $searchForm from page template but in SS4 we can't have two classes in one file, so when I separate out TestSearchPage and TestSearchPageController in two different files, page template can't call $searchForm. I tried adding getControllerName method in TestSearchPage class but that didn't help.