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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5d2ab378600..da6b3c7cfd1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,16 +1,14 @@ { "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], - + "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" - - // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. - // "remoteUser": "vscode" } 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