Skip to content

Commit

Permalink
update images
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-p committed Jun 1, 2024
1 parent 51bd53e commit 2266214
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 66 deletions.
42 changes: 21 additions & 21 deletions images/php-7.4/apache/v1.1.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ RUN apt-get update && apt-get upgrade --no-install-recommends -y && \

# install default ssl site conf for apache
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ssl-cert \
certbot \
python3-certbot-apache \
at && \
apt-get clean && rm -rf /var/lib/apt/lists/*
apt-get install -y --no-install-recommends \
ssl-cert \
certbot \
python3-certbot-apache \
at && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod ssl; \
a2ensite default-ssl;
Expand All @@ -38,7 +38,7 @@ EXPOSE 80
EXPOSE 443
# Install PHP extensions
RUN docker-php-ext-configure zip --with-zip && \
docker-php-ext-configure gd --with-jpeg --with-webp && \
docker-php-ext-configure gd --with-jpeg --with-webp && \
docker-php-ext-install \
exif \
gd \
Expand All @@ -55,22 +55,22 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

# Recommended opcache settings - https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/docker-wn-opcache.ini
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/docker-wn-opcache.ini

RUN { \
echo 'log_errors=on'; \
echo 'display_errors=off'; \
echo 'upload_max_filesize=32M'; \
echo 'post_max_size=32M'; \
echo 'memory_limit=128M'; \
echo 'log_errors=on'; \
echo 'display_errors=off'; \
echo 'upload_max_filesize=32M'; \
echo 'post_max_size=32M'; \
echo 'memory_limit=128M'; \
echo 'expose_php=off'; \
} > /usr/local/etc/php/conf.d/docker-wn-php.ini
} > /usr/local/etc/php/conf.d/docker-wn-php.ini

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/local/bin --filename=composer
Expand Down Expand Up @@ -106,4 +106,4 @@ COPY docker-wn-entrypoint /usr/local/bin/
ENTRYPOINT ["docker-wn-entrypoint"]

# command
CMD ["apache2-foreground"]
CMD ["apache2-foreground"]
30 changes: 15 additions & 15 deletions images/php-7.4/fpm/v1.1.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update && apt-get upgrade --no-install-recommends -y && \

# Install PHP extensions
RUN docker-php-ext-configure zip --with-zip && \
docker-php-ext-configure gd --with-jpeg --with-webp && \
docker-php-ext-configure gd --with-jpeg --with-webp && \
docker-php-ext-install \
exif \
gd \
Expand All @@ -41,22 +41,22 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

# Recommended opcache settings - https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/docker-wn-opcache.ini
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/docker-wn-opcache.ini

RUN { \
echo 'log_errors=on'; \
echo 'display_errors=off'; \
echo 'upload_max_filesize=32M'; \
echo 'post_max_size=32M'; \
echo 'memory_limit=128M'; \
echo 'log_errors=on'; \
echo 'display_errors=off'; \
echo 'upload_max_filesize=32M'; \
echo 'post_max_size=32M'; \
echo 'memory_limit=128M'; \
echo 'expose_php=off'; \
} > /usr/local/etc/php/conf.d/docker-wn-php.ini
} > /usr/local/etc/php/conf.d/docker-wn-php.ini

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/local/bin --filename=composer
Expand Down Expand Up @@ -89,4 +89,4 @@ COPY docker-wn-entrypoint /usr/local/bin/
ENTRYPOINT ["docker-wn-entrypoint"]

# command
CMD ["php-fpm"]
CMD ["php-fpm"]
8 changes: 5 additions & 3 deletions images/php-8.1/apache/v1.2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod ssl; \
a2ensite default-ssl;
a2ensite default-ssl;

EXPOSE 80
EXPOSE 443
Expand Down Expand Up @@ -77,12 +77,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.4 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -97,7 +99,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# enable mod rewrite
RUN a2enmod rewrite
Expand Down
8 changes: 5 additions & 3 deletions images/php-8.1/apache/v1.2.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod ssl; \
a2ensite default-ssl;
a2ensite default-ssl;

EXPOSE 80
EXPOSE 443
Expand Down Expand Up @@ -77,12 +77,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.5 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -97,7 +99,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# enable mod rewrite
RUN a2enmod rewrite
Expand Down
8 changes: 5 additions & 3 deletions images/php-8.1/apache/v1.2.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod ssl; \
a2ensite default-ssl;
a2ensite default-ssl;

EXPOSE 80
EXPOSE 443
Expand Down Expand Up @@ -77,12 +77,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.6 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -97,7 +99,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# enable mod rewrite
RUN a2enmod rewrite
Expand Down
6 changes: 4 additions & 2 deletions images/php-8.1/fpm/v1.2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.4 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -83,7 +85,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# copy fix permissions script
COPY docker-wn-fix-permissions /usr/local/bin/
Expand Down
6 changes: 4 additions & 2 deletions images/php-8.1/fpm/v1.2.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.5 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -83,7 +85,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# copy fix permissions script
COPY docker-wn-fix-permissions /usr/local/bin/
Expand Down
6 changes: 4 additions & 2 deletions images/php-8.1/fpm/v1.2.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.6 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -83,7 +85,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# copy fix permissions script
COPY docker-wn-fix-permissions /usr/local/bin/
Expand Down
8 changes: 5 additions & 3 deletions images/php-8.2/apache/v1.2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod ssl; \
a2ensite default-ssl;
a2ensite default-ssl;

EXPOSE 80
EXPOSE 443
Expand Down Expand Up @@ -77,12 +77,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.4 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -97,7 +99,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# enable mod rewrite
RUN a2enmod rewrite
Expand Down
8 changes: 5 additions & 3 deletions images/php-8.2/apache/v1.2.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod ssl; \
a2ensite default-ssl;
a2ensite default-ssl;

EXPOSE 80
EXPOSE 443
Expand Down Expand Up @@ -77,12 +77,14 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l

# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:1.2.5 . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -97,7 +99,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

# enable mod rewrite
RUN a2enmod rewrite
Expand Down
Loading

0 comments on commit 2266214

Please sign in to comment.