aboutsummaryrefslogtreecommitdiffstats
path: root/.devcontainer/Dockerfile
diff options
context:
space:
mode:
authorRobin Windey <ro.windey@gmail.com>2023-03-27 07:05:27 +0000
committerGitHub <noreply@github.com>2023-03-31 13:53:04 +0000
commita32e8db7031bbb3e183afdf8cabc9b16910dec86 (patch)
treeb1c83168bd14c2ffc86035cc5d98b7b13c63fe45 /.devcontainer/Dockerfile
parent79fb336d35953a1bad648e256c5f57eee2809041 (diff)
downloadnextcloud-server-a32e8db7031bbb3e183afdf8cabc9b16910dec86.tar.gz
nextcloud-server-a32e8db7031bbb3e183afdf8cabc9b16910dec86.zip
Minor DevContainer adjustments
* Add gnupg2 to be able to sign commits * Make sure /var/www/html always belongs to www-data * Add Git-History plugin * Introduce dedicated entrypoint script * Store Postgres database data in volume to be persistent * Cleaner check if NC is already installed in setup.sh * Add composer to DevContainer Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to '.devcontainer/Dockerfile')
-rw-r--r--.devcontainer/Dockerfile13
1 files changed, 11 insertions, 2 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index b674943a587..642ee36d1a1 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -4,7 +4,7 @@ ARG DEBIAN_FRONTEND=noninteractive
# PHP
RUN apt-get update -y && \
- apt install -y apache2 vim software-properties-common sudo nano
+ apt install -y apache2 vim software-properties-common sudo nano gnupg2
RUN apt-get install --no-install-recommends -y \
php8.1 \
@@ -36,6 +36,15 @@ RUN apt-get install --no-install-recommends -y \
nodejs \
npm
+# Composer
+# Download the Composer installer script to a temporary file
+RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php && \
+ curl -sS https://composer.github.io/installer.sig -o /tmp/composer-setup.sig && \
+ php -r "if (hash_file('sha384', '/tmp/composer-setup.php') !== trim(file_get_contents('/tmp/composer-setup.sig'))) { echo 'Composer installation failed, invalid hash'; exit(1); }" && \
+ php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
+ rm /tmp/composer-setup.php /tmp/composer-setup.sig
+
+
RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini && \
echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini
@@ -52,7 +61,7 @@ RUN apt-get -y install \
curl \
gnupg-agent \
software-properties-common && \
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \