summaryrefslogtreecommitdiffstats
path: root/.devcontainer
diff options
context:
space:
mode:
authorStephan <stephan_orbaugh@outlook.de>2023-03-10 10:28:26 +0100
committerGitHub <noreply@github.com>2023-03-31 13:38:26 +0000
commit81df7d636e06d1cf5b4aa6ee8e7be8d8fe73c3c9 (patch)
tree7223561d78913212dcd46a2e96af8a3995b5476e /.devcontainer
parenta1aa4491acac6217061a1cecc8cb9d807292376c (diff)
downloadnextcloud-server-81df7d636e06d1cf5b4aa6ee8e7be8d8fe73c3c9.tar.gz
nextcloud-server-81df7d636e06d1cf5b4aa6ee8e7be8d8fe73c3c9.zip
Proposed change to in-build docker-compose.yml and Dockerfile. The current implementation uses php 7.4, which is no longer compatible with the required PHP version of the server. I upped this to PHP 8.1
List of changes: - Upped PHP Version to 8.1 - Added Apache Webserver so the Container works "out of the box" after docker-compose up -d - Mounting whole project as volume to /var/www/html in docker-compose.yml (and set WORKDIR to /var/www/html) Tested in a Docker for Windows environment.
Diffstat (limited to '.devcontainer')
-rw-r--r--.devcontainer/Dockerfile50
-rw-r--r--.devcontainer/docker-compose.yml1
2 files changed, 33 insertions, 18 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 4374d03954f..42d94e9963e 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -4,31 +4,43 @@ ARG DEBIAN_FRONTEND=noninteractive
# PHP
RUN apt-get update -y
+
+RUN apt install -y apache2 vim software-properties-common
+
+RUN add-apt-repository ppa:ondrej/php
+
RUN apt-get install --no-install-recommends -y \
- php7.4 \
- php7.4-gd \
- php7.4-zip \
- php7.4-curl \
- php7.4-xml \
- php7.4-mbstring \
- php7.4-sqlite \
- php7.4-xdebug \
- php7.4-pgsql \
- php7.4-intl \
- php7.4-imagick \
- php7.4-gmp \
- php7.4-apcu \
- php7.4-bcmath \
+ php8.1 \
+ php8.1-common \
+ php8.1-gd \
+ php8.1-zip \
+ php8.1-curl \
+ php8.1-xml \
+ php8.1-xmlrpc \
+ php8.1-mbstring \
+ php8.1-sqlite \
+ php8.1-xdebug \
+ php8.1-pgsql \
+ php8.1-intl \
+ php8.1-imagick \
+ php8.1-gmp \
+ php8.1-apcu \
+ php8.1-bcmath \
+ php8.1-redis \
+ php8.1-soap \
+ php8.1-imap \
+ php8.1-opcache \
+ php8.1-cli \
+ php8.1-dev \
libmagickcore-6.q16-3-extra \
curl \
- vim \
lsof \
make \
nodejs \
npm
-RUN echo "xdebug.remote_enable = 1" >> /etc/php/7.4/cli/conf.d/20-xdebug.ini
-RUN echo "xdebug.remote_autostart = 1" >> /etc/php/7.4/cli/conf.d/20-xdebug.ini
+RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini
+RUN echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini
# Docker
RUN apt-get -y install \
@@ -44,4 +56,6 @@ RUN add-apt-repository \
stable"
RUN apt-get update -y
RUN apt-get install -y docker-ce docker-ce-cli containerd.io
-RUN ln -s /var/run/docker-host.sock /var/run/docker.sock
+RUN ln -s /var/run/docker-host.sock /var/run/docker.sock
+
+WORKDIR /var/www/html
diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml
index ada819429f4..ffec604fbb6 100644
--- a/.devcontainer/docker-compose.yml
+++ b/.devcontainer/docker-compose.yml
@@ -5,6 +5,7 @@ services:
volumes:
- .:/workspace:cached
- /var/run/docker.sock:/var/run/docker-host.sock
+ - ..:/var/www/html
command: /bin/sh -c "while sleep 1000; do :; done"
ports:
- 80:80