Skip to content

Commit

Permalink
Added development container description
Browse files Browse the repository at this point in the history
  • Loading branch information
foxfabi committed Oct 4, 2021
1 parent 28cc2f4 commit ff2d657
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
* [**MailDev**](https://github.com/maildev/maildev) SMTP Server + Web Interface for viewing and testing emails during development.
* **PHP 7.4.x (CLI)** with Composer, PHP CodeSniffer, phpDocumentor, phpunit and XDebug for development.

The Visual Studio Code [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder or repository inside a container and take advantage of Visual Studio Code's full feature set. The [devcontainer.json](./.devcontainer.json) file tells VS Code how to access (or create) the development container with well-defined tool and runtime stack.

**Since everything that has to do with the stack, only runs in the container, you have to put the commands into the corresponding container.**

**The local folder `code` is mapped to `/opt/code` in the phpdev container**
**Once visual studio code is attached to the container, you can also download the files manually**

Read more:

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

## Installed utilities

Expand All @@ -15,6 +21,10 @@
* [PHPUnit](https://phpunit.de/) is a programmer-oriented testing framework for PHP.
* [Xdebug](https://xdebug.org/) - Debugger and Profiler Tool for PHP

### Coding standard

The default coding standard used by PHP_CodeSniffer is the PEAR coding standard. If you wish to check your code against the PSR-12 coding standard, use the `--standard` command line argument: `phpcs --standard=PSR12 /path/to/code-directory`

## Useful commands

To start/stop the stack, enter the following command in the terminal:
Expand Down Expand Up @@ -43,12 +53,6 @@ cd code
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.**
Expand Down

0 comments on commit ff2d657

Please sign in to comment.