mirror of
https://github.com/friendica/friendica
synced 2025-11-13 08:35:21 +01:00
Merge pull request #15231 from Art4/update-devcontainer
Update devcontainer to PHP 8.4
This commit is contained in:
commit
1cfa88bb90
2 changed files with 54 additions and 52 deletions
|
|
@ -1,11 +1,6 @@
|
|||
ARG VARIANT="8.2-apache-bullseye"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/php:${VARIANT}
|
||||
FROM php:8.4-apache
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG apcu_version=5.1.23
|
||||
ARG memcached_version=3.2.0
|
||||
ARG redis_version=6.0.2
|
||||
ARG imagick_version=3.7.0
|
||||
|
||||
RUN apt-get update -y;
|
||||
|
||||
|
|
@ -13,14 +8,22 @@ RUN apt-get update -y;
|
|||
RUN apt-get install -y mariadb-client
|
||||
|
||||
# Base packages
|
||||
RUN apt install -y vim software-properties-common sudo nano gnupg2
|
||||
RUN apt-get install -y \
|
||||
vim \
|
||||
sudo \
|
||||
nano \
|
||||
git \
|
||||
gnupg2 \
|
||||
pinentry-curses \
|
||||
;
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
rsync \
|
||||
bzip2 \
|
||||
msmtp \
|
||||
tini
|
||||
tini \
|
||||
;
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
bash \
|
||||
|
|
@ -38,36 +41,40 @@ RUN apt-get install -y --no-install-recommends \
|
|||
libzip-dev \
|
||||
libldap2-dev \
|
||||
libgmp-dev \
|
||||
libmagickcore-6.q16-6-extra \
|
||||
; \
|
||||
\
|
||||
docker-php-ext-configure gd \
|
||||
--with-freetype \
|
||||
--with-jpeg \
|
||||
--with-webp \
|
||||
; \
|
||||
docker-php-ext-install -j "$(nproc)" \
|
||||
pdo_mysql \
|
||||
gd \
|
||||
exif \
|
||||
zip \
|
||||
opcache \
|
||||
ctype \
|
||||
pcntl \
|
||||
ldap \
|
||||
gmp \
|
||||
intl
|
||||
# libmagickcore-6.q16-6-extra \
|
||||
;
|
||||
|
||||
RUN docker-php-ext-configure gd \
|
||||
--with-freetype \
|
||||
--with-jpeg \
|
||||
--with-webp \
|
||||
;
|
||||
|
||||
RUN docker-php-ext-install -j "$(nproc)" \
|
||||
pdo_mysql \
|
||||
gd \
|
||||
exif \
|
||||
zip \
|
||||
opcache \
|
||||
ctype \
|
||||
pcntl \
|
||||
ldap \
|
||||
gmp \
|
||||
intl \
|
||||
;
|
||||
|
||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||
RUN pecl install apcu-${apcu_version}; \
|
||||
pecl install memcached-${memcached_version}; \
|
||||
pecl install redis-${redis_version}; \
|
||||
pecl install imagick-${imagick_version}; \
|
||||
docker-php-ext-enable \
|
||||
apcu \
|
||||
memcached \
|
||||
redis \
|
||||
imagick
|
||||
RUN pecl install apcu-5.1.27;
|
||||
RUN pecl install memcached-3.4.0;
|
||||
RUN pecl install redis-6.2.0;
|
||||
RUN pecl install imagick-3.8.0;
|
||||
|
||||
RUN docker-php-ext-enable \
|
||||
apcu \
|
||||
memcached \
|
||||
redis \
|
||||
imagick \
|
||||
;
|
||||
|
||||
RUN apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
|
@ -89,8 +96,8 @@ RUN { \
|
|||
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
|
||||
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \
|
||||
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
|
||||
} > /usr/local/etc/php/conf.d/friendica.ini; \
|
||||
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
|
||||
\
|
||||
mkdir /var/www/data; \
|
||||
chmod -R g=u /var/www
|
||||
} > /usr/local/etc/php/conf.d/friendica.ini;
|
||||
|
||||
RUN ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
|
||||
RUN mkdir /var/www/data
|
||||
RUN chmod -R g=u /var/www
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
|
|
@ -14,16 +12,14 @@ services:
|
|||
command: sleep infinity
|
||||
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 8080:8080
|
||||
- 3306:3306
|
||||
|
||||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
|
||||
- ${ServerPort:-8080}:80
|
||||
- 8443:443
|
||||
|
||||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
|
||||
# (Adding the "ports" property to this file will not forward from a Codespace.)
|
||||
|
||||
extra_hosts:
|
||||
- "${ServerAlias}:127.0.0.1"
|
||||
- "${ServerAlias}:127.0.0.1"
|
||||
|
||||
db:
|
||||
image: mariadb:10.4
|
||||
|
|
@ -49,4 +45,3 @@ volumes:
|
|||
|
||||
networks:
|
||||
default:
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue