Skip to content

Commit

Permalink
Added VS Code's container configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
foxfabi committed Sep 8, 2021
1 parent a6aff52 commit 2be43c8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
{
"name": "PHP",
"dockerComposeFile": "./docker-compose.yml",
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
"service": "phpdev",
// Default path to open when attaching to a new container.
"workspaceFolder": "/opt/code",
// Set *default* container specific settings.json values on container create.
"settings": {
"php.executablePath": "/usr/local/bin/php",
"php.validate.executablePath": "/usr/local/bin/php",
"phpcs.executablePath": "/usr/local/bin/phpcs"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"felixfbecker.php-debug",
"ikappas.phpcs",
"neilbrayfield.php-docblocker",
"usernamehw.errorlens",
"pomber.git-file-history",
"mhutchie.git-graph",
"michelemelluso.gitignore",
"eamodio.gitlens",
"christian-kohler.path-intellisense",
"mutantdino.resourcemonitor"
]
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,23 @@ docker exec -i phpdev php example.php
## Visual Studio Code integration

See [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers)

* [Attach to a running container](https://code.visualstudio.com/docs/remote/attach-container)

## Local Host integration

**Add the `bin` folder to your PATH environment variable.**

If you are using powershell add following command into your vscode settings.json:

```json
"phpcs.executablePath": "phpcs.bat",
"php.executablePath": "php.bat",
"php.validate.executablePath": "php.bat"
```

If you are using git bash add following command into your vscode settings.json:

```json
"phpcs.executablePath": "phpcs",
"php.executablePath": "php",
Expand Down

0 comments on commit 2be43c8

Please sign in to comment.