bedrock-docker
bedrock-docker copied to clipboard
sage required php 8.2
Version
latest
What did you expect to happen?
Sage theme auto setup
What actually happens?
At first it's return error that php is currently 8.0 and error message seems reads php 8.2 is minimum requirement
Steps to reproduce
Just install roots/acorn inside bedrock
System info
n/a
Log output
n/a
Please confirm this isn't a support request.
No
Here is how I fix it. Please add it to your "bedrock.dockerfile" file:
FROM php:8.2-fpm as base LABEL name=bedrock LABEL intermediate=true
Install essential packages
RUN apt-get update
&& apt-get install -y
build-essential
curl
git
gnupg
less
nano
vim
unzip
zip
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
&& rm -rf /var/lib/apt/lists/*
&& apt-get clean
FROM base as php LABEL name=bedrock LABEL intermediate=true
Install php extensions and related packages
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && sync
&& install-php-extensions
@composer
exif
gd
memcached
mysqli
pcntl
pdo_mysql
zip
&& apt-get update
&& apt-get install -y
gifsicle
jpegoptim
libpng-dev
libjpeg62-turbo-dev
libfreetype6-dev
libmemcached-dev
locales
lua-zlib-dev
optipng
pngquant
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
&& rm -rf /var/lib/apt/lists/*
&& apt-get clean
FROM php as bedrock LABEL name=bedrock
Install nginx & supervisor
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash
&& apt-get update
&& apt-get install -y
nginx
nodejs
supervisor
npm
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
&& rm -rf /var/lib/apt/lists/*
&& apt-get clean
&& npm install -g yarn
Configure nginx, php-fpm and supervisor
COPY ./build/nginx/nginx.conf /etc/nginx/nginx.conf COPY ./build/nginx/sites-enabled /etc/nginx/conf.d COPY ./build/nginx/sites-enabled /etc/nginx/sites-enabled COPY ./build/php/8.0/fpm/pool.d /etc/php/8.0/fpm/pool.d COPY ./build/supervisor/supervisord.conf /etc/supervisord.conf
WordPress CLI
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
&& chmod +x wp-cli.phar
&& mv wp-cli.phar /usr/bin/_wp;
COPY ./build/bin/wp.sh /srv/wp.sh
RUN chmod +x /srv/wp.sh
&& mv /srv/wp.sh /usr/bin/wp
Installation helper
COPY ./build/bin/bedrock-install.sh /srv/bedrock-install.sh RUN chmod +x /srv/bedrock-install.sh
WORKDIR /srv/bedrock CMD ["/srv/bedrock-install.sh"]
Bedrock requires PHP 8.0 as a minimum which is why this setup uses it.
Bedrock is now bumping the requirements to PHP 8.1, along with moving to a dev container setup contained in the repo. This repo will soon be archived.