From d067a5c1033e72b9544777c32468f0a58a745c60 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Thu, 28 Nov 2024 22:52:50 +0100 Subject: [PATCH 1/4] Update devcontainer.json --- .devcontainer/devcontainer.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5d2ab378600..d2efaccbbfb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,16 +1,12 @@ { "name": "PHP & SQLite", - "service": "app", "workspaceFolder": "/workspace", - "dockerComposeFile": "docker-compose.yml", - + "image": "ghcr.io/asbiin/devcontainers/php:8.2", + // For use with PHP or Apache (e.g.php -S localhost:8080 or apache2ctl start) "forwardPorts": [8080], // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": ".devcontainer/postCreate.sh", "postStartCommand": ".devcontainer/postStart.sh" - - // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. - // "remoteUser": "vscode" } From 293cfcb9e3de410e5663a460dfa9f2f0cc8406d6 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Thu, 28 Nov 2024 22:53:49 +0100 Subject: [PATCH 2/4] Delete .devcontainer/Dockerfile --- .devcontainer/Dockerfile | 77 ---------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index b3a390e0d09..00000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -# Update the VARIANT arg in docker-compose.yml to pick a PHP version: 8, 8.0, 8.1 -ARG VARIANT=8 -FROM mcr.microsoft.com/devcontainers/php:${VARIANT} - -# Install packages -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - sqlite3 \ - ; \ - rm -rf /var/lib/apt/lists/* - -# Update args in docker-compose.yaml to set the UID/GID of the "vscode" user. -ARG USER_UID=1000 -ARG USER_GID=$USER_UID -RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \ - groupmod --gid $USER_GID vscode \ - && usermod --uid $USER_UID --gid $USER_GID vscode \ - && chmod -R $USER_UID:$USER_GID /home/vscode \ - && chmod -R $USER_UID:root /usr/local/share/nvm; \ - fi - -# [Optional] Install a version of Node.js using nvm for front end dev -ARG INSTALL_NODE="true" -ARG NODE_VERSION="lts/*" -RUN if [ "${INSTALL_NODE}" = "true" ]; then bash -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION}"; fi - -# [Optional] Uncomment this section to install additional OS packages. -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libicu-dev \ - zlib1g-dev \ - libzip-dev \ - libpng-dev \ - libpq-dev \ - libxml2-dev \ - libfreetype6-dev \ - libjpeg62-turbo-dev \ - libgmp-dev \ - libmemcached-dev \ - libmagickwand-dev \ - libwebp-dev \ - ; \ - \ - debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ - docker-php-ext-configure intl; \ - docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp; \ - docker-php-ext-configure gmp; \ - docker-php-ext-install -j$(nproc) \ - intl \ - zip \ - bcmath \ - gd \ - gmp \ - pdo_mysql \ - mysqli \ - pdo_pgsql \ - soap \ - ; \ - \ - pecl install APCu; \ - pecl install memcached; \ - pecl install redis; \ - \ - docker-php-ext-enable \ - apcu \ - memcached \ - redis \ - ; \ - \ - rm -rf /var/lib/apt/lists/* - -# [Optional] Uncomment this line to install global node packages. -RUN npm install -g --unsafe-perm yarn From 33e753fcac7067b3969388c7c54e6f0908663700 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Thu, 28 Nov 2024 22:54:07 +0100 Subject: [PATCH 3/4] Delete .devcontainer/docker-compose.yml --- .devcontainer/docker-compose.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml deleted file mode 100644 index e20881dd03e..00000000000 --- a/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: '3' - -services: - app: - build: - context: . - dockerfile: Dockerfile - args: - VARIANT: '8.2' - # [Option] Install Node.js - INSTALL_NODE: 'true' - NODE_VERSION: 'lts/*' - # On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000. - USER_UID: 1000 - USER_GID: 1000 - - volumes: - - ..:/workspace:cached - - # Overrides default command so things don't shut down after the process ends. - command: sleep infinity From 17521eb0d73a3b4b19259fcab4383f1663ebcc1a Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Thu, 28 Nov 2024 22:59:37 +0100 Subject: [PATCH 4/4] Update devcontainer.json --- .devcontainer/devcontainer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d2efaccbbfb..da6b3c7cfd1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,13 @@ { "name": "PHP & SQLite", - "workspaceFolder": "/workspace", "image": "ghcr.io/asbiin/devcontainers/php:8.2", // For use with PHP or Apache (e.g.php -S localhost:8080 or apache2ctl start) "forwardPorts": [8080], - + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": ".devcontainer/postCreate.sh", "postStartCommand": ".devcontainer/postStart.sh"