Skip to content

Commit 842f3a4

Browse files
authored
Merge branch 'master' into fix/45034-clear-cached-user-groups-on-pre-hooks
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2 parents d33cac0 + 01fa738 commit 842f3a4

13,425 files changed

Lines changed: 745176 additions & 556807 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1-
FROM ubuntu:jammy
1+
FROM ubuntu:noble
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

55
# PHP
66
RUN apt-get update -y && \
7-
apt install -y apache2 vim software-properties-common sudo nano gnupg2
7+
apt install -y apache2 vim software-properties-common sudo nano gnupg2 wget curl git \
8+
lsb-release ca-certificates apt-transport-https && \
9+
add-apt-repository ppa:ondrej/php -y && \
10+
apt-get update -y
811

912
RUN apt-get install --no-install-recommends -y \
10-
php8.1 \
11-
php8.1-common \
12-
php8.1-gd \
13-
php8.1-zip \
14-
php8.1-curl \
15-
php8.1-xml \
16-
php8.1-xmlrpc \
17-
php8.1-mbstring \
18-
php8.1-sqlite \
19-
php8.1-xdebug \
20-
php8.1-pgsql \
21-
php8.1-intl \
22-
php8.1-imagick \
23-
php8.1-gmp \
24-
php8.1-apcu \
25-
php8.1-bcmath \
26-
php8.1-redis \
27-
php8.1-soap \
28-
php8.1-imap \
29-
php8.1-opcache \
30-
php8.1-cli \
31-
php8.1-dev \
32-
libmagickcore-6.q16-3-extra \
33-
curl \
13+
php8.4 \
14+
php8.4-common \
15+
php8.4-gd \
16+
php8.4-zip \
17+
php8.4-curl \
18+
php8.4-xml \
19+
php8.4-xmlrpc \
20+
php8.4-mbstring \
21+
php8.4-sqlite \
22+
php8.4-xdebug \
23+
php8.4-pgsql \
24+
php8.4-intl \
25+
php8.4-imagick \
26+
php8.4-gmp \
27+
php8.4-apcu \
28+
php8.4-bcmath \
29+
php8.4-redis \
30+
php8.4-soap \
31+
php8.4-imap \
32+
php8.4-opcache \
33+
php8.4-cli \
34+
php8.4-dev \
35+
libmagickcore-6.q16-7-extra \
3436
lsof \
3537
make \
3638
unzip
@@ -42,36 +44,39 @@ RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php && \
4244
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
4345
rm /tmp/composer-setup.php /tmp/composer-setup.sig
4446

45-
RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini && \
46-
echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini && \
47-
echo "apc.enable_cli=1" >> /etc/php/8.1/cli/conf.d/20-apcu.ini
47+
RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.4/cli/conf.d/20-xdebug.ini && \
48+
echo "xdebug.remote_autostart = 1" >> /etc/php/8.4/cli/conf.d/20-xdebug.ini && \
49+
echo "apc.enable_cli=1" >> /etc/php/8.4/cli/conf.d/20-apcu.ini
4850

4951
# Autostart XDebug for apache
5052
RUN { \
5153
echo "xdebug.mode=debug"; \
5254
echo "xdebug.start_with_request=yes"; \
53-
} >> /etc/php/8.1/apache2/conf.d/20-xdebug.ini
55+
} >> /etc/php/8.4/apache2/conf.d/20-xdebug.ini
5456

55-
# Docker
56-
RUN apt-get -y install \
57-
apt-transport-https \
58-
ca-certificates \
59-
curl \
60-
gnupg-agent \
61-
software-properties-common && \
62-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
63-
add-apt-repository \
64-
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
65-
$(lsb_release -cs) \
66-
stable" && \
57+
# Increase PHP memory limit to 512mb
58+
RUN sed -i 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.4/apache2/php.ini
59+
60+
# Docker CLI only (for controlling host Docker via socket)
61+
RUN install -m 0755 -d /etc/apt/keyrings && \
62+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && \
63+
chmod a+r /etc/apt/keyrings/docker.asc && \
64+
echo \
65+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
66+
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
67+
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
6768
apt-get update -y && \
68-
apt-get install -y docker-ce docker-ce-cli containerd.io && \
69+
apt-get install -y docker-ce-cli && \
6970
ln -s /var/run/docker-host.sock /var/run/docker.sock
7071

7172
# Dedicated DevContainer user runs Apache
7273
ENV APACHE_RUN_USER=devcontainer
7374
ENV APACHE_RUN_GROUP=devcontainer
74-
RUN useradd -ms /bin/bash ${APACHE_RUN_USER} && \
75+
# Delete any existing user/group with UID/GID 1000 first
76+
RUN (getent passwd 1000 && userdel -r $(getent passwd 1000 | cut -d: -f1)) || true && \
77+
(getent group 1000 && groupdel $(getent group 1000 | cut -d: -f1)) || true && \
78+
groupadd -g 1000 ${APACHE_RUN_GROUP} && \
79+
useradd -u 1000 -g 1000 -ms /bin/bash ${APACHE_RUN_USER} && \
7580
adduser ${APACHE_RUN_USER} sudo && \
7681
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
7782
sed -ri "s/^export APACHE_RUN_USER=.*$/export APACHE_RUN_USER=${APACHE_RUN_USER}/" "/etc/apache2/envvars" && \
@@ -81,6 +86,6 @@ USER devcontainer
8186

8287
# NVM
8388
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
84-
RUN bash --login -i -c 'source /home/devcontainer/.bashrc && nvm install 16'
89+
RUN bash --login -i -c 'source /home/devcontainer/.bashrc && nvm install 22'
8590

8691
WORKDIR /var/www/html

.devcontainer/Dockerfile.license

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
2+
SPDX-License-Identifier: AGPL-3.0-or-later

.devcontainer/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
- SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
3+
- SPDX-License-Identifier: AGPL-3.0-or-later
4+
-->
15
# Nextcloud DevContainer
26

37
## Usage

.devcontainer/codespace.config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
22

3+
/**
4+
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
5+
* SPDX-License-Identifier: AGPL-3.0-or-later
6+
*/
37
$codespaceName = getenv('CODESPACE_NAME');
48
$codespaceDomain = getenv('GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN');
59

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
2+
SPDX-License-Identifier: AGPL-3.0-or-later

.devcontainer/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
version: '3'
1+
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
23
services:
34
nextclouddev:
45
build: .

.devcontainer/entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
2-
2+
#
3+
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
4+
# SPDX-License-Identifier: AGPL-3.0-or-later
5+
#
36
sudo service apache2 start
47

58
while sleep 1000; do :; done

.devcontainer/launch.json.license

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
2+
SPDX-License-Identifier: AGPL-3.0-or-later

.devcontainer/postStart.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#!/bin/bash
2-
2+
#
3+
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
4+
# SPDX-License-Identifier: AGPL-3.0-or-later
5+
#
36
# Set git safe.directory
47
git config --global --add safe.directory /var/www/html
5-
git config --global --add safe.directory /var/www/html/3rdparty
8+
git config --global --add safe.directory /var/www/html/3rdparty
9+
10+
# Ensure devcontainer user has access to docker socket
11+
if [ -S /var/run/docker.sock ]; then
12+
sudo chmod 666 /var/run/docker.sock
13+
fi

.devcontainer/setup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/bash
2+
#
3+
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
4+
# SPDX-License-Identifier: AGPL-3.0-or-later
5+
#
26
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )"
37

48
cd $DIR/

0 commit comments

Comments
 (0)