Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage required php 8.2 #3

Open
htmldiz opened this issue Jan 2, 2024 · 1 comment
Open

sage required php 8.2 #3

htmldiz opened this issue Jan 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@htmldiz
Copy link

htmldiz commented Jan 2, 2024

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

@htmldiz htmldiz added the bug Something isn't working label Jan 2, 2024
@htmldiz
Copy link
Author

htmldiz commented Jan 2, 2024

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://github.com/raw/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"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant