// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: // https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/php { "name": "PHP", "build": { "dockerfile": "Dockerfile", "args": { // Update VARIANT to pick a PHP version: 8, 8.0, 7, 7.4, 7.3 // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local on arm64/Apple Silicon. "VARIANT": "8-bullseye", "NODE_VERSION": "lts/*", "ID_ED25519_PRIV": "${localEnv:ID_ED25519_PRIV}", // Swoole version: 4.5.7 ~ 4.8.9 "SWOOLE_VERSION": "none", // https://wiki.swoole.com/#/environment?id=pecl "SWOOLE_CONFIGURE_OPTIONS": "'enable-sockets=\"yes\" enable-openssl=\"yes\" enable-http2=\"yes\" enable-mysqlnd=\"yes\" enable-swoole-json=\"yes\" enable-swoole-curl=\"yes\" enable-cares=\"yes\"'" } }, // Set *default* container specific settings.json values on container create. "settings": { "php.validate.executablePath": "/usr/local/bin/php" }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "felixfbecker.php-debug", "bmewburn.vscode-intelephense-client", "mrmlnc.vscode-apache" ], // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [8080], // Use 'portsAttributes' to set default properties for specific forwarded ports. More info: https://code.visualstudio.com/docs/remote/devcontainerjson-reference. "portsAttributes": { "8000": { "label": "Hello Remote World", "onAutoForward": "notify" } }, // Use 'otherPortsAttributes' to configure any ports that aren't configured using 'portsAttributes'. // "otherPortsAttributes": { // "onAutoForward": "silent" // }, // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html" // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "vscode" }