diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100755 index 0000000..853cd59 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,22 @@ +ARG VARIANT=8.2-apache-bookworm +FROM php:${VARIANT} + +# Install xdebug +RUN yes | pecl install xdebug \ + && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ + && echo "xdebug.mode = debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ + && echo "xdebug.start_with_request = yes" >> /usr/local/etc/php/conf.d/xdebug.ini \ + && echo "xdebug.client_port = 9000" >> /usr/local/etc/php/conf.d/xdebug.ini \ + && rm -rf /tmp/pear + +# Install composer +RUN curl -sSL https://getcomposer.org/installer | php \ + && chmod +x composer.phar \ + && mv composer.phar /usr/local/bin/composer + +# "spryker/decimal-object" needs bcmath +RUN docker-php-ext-install bcmath + +# [Optional] Uncomment this section to install additional packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 423a7a3..48973d5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,10 @@ { "name": "PHP", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/php:1-8.2-bookworm", + "build": { + // Path is relative to the devcontainer.json file. + "dockerfile": "Dockerfile" + }, // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, @@ -13,7 +16,8 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [ - 8080 + 8080, + 9000 ], "features": { "ghcr.io/devcontainers/features/github-cli:1": {