mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-28 04:31:47 +02:00
feat(devcontainer): add devcontainer settings for dev environment
This commit is contained in:
parent
d523597515
commit
69e7266736
11
.devcontainer/Dockerfile
Normal file
11
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM php:latest
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libicu-dev \
|
||||||
|
&& docker-php-ext-install intl
|
||||||
|
|
||||||
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get upgrade -y && \
|
||||||
|
apt-get install -y git
|
16
.devcontainer/devcontainer.json
Normal file
16
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
|
||||||
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/docker-existing-dockerfile
|
||||||
|
{
|
||||||
|
"name": "Existing Dockerfile",
|
||||||
|
"dockerFile": "./Dockerfile",
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": null
|
||||||
|
},
|
||||||
|
"extensions": [
|
||||||
|
"mikestead.dotenv",
|
||||||
|
"bmewburn.vscode-intelephense-client",
|
||||||
|
"streetsidesoftware.code-spell-checker",
|
||||||
|
"naumovs.color-highlight",
|
||||||
|
"heybourn.headwind"
|
||||||
|
]
|
||||||
|
}
|
21
README.md
21
README.md
@ -128,3 +128,24 @@ docker-compose down
|
|||||||
```
|
```
|
||||||
|
|
||||||
Check [docker](https://docs.docker.com/engine/reference/commandline/docker/) and [docker-compose](https://docs.docker.com/compose/reference/) documentations for more insights.
|
Check [docker](https://docs.docker.com/engine/reference/commandline/docker/) and [docker-compose](https://docs.docker.com/compose/reference/) documentations for more insights.
|
||||||
|
|
||||||
|
### Developing inside a Container
|
||||||
|
|
||||||
|
If you're working in VSCode, you can take advantage of the `./.devcontainer/` folder. It defines a development container with preinstalled VSCode extensions so you don't have to worry about them. The container will be loaded with php, composer and git:
|
||||||
|
|
||||||
|
1. Install the VSCode extension [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
|
||||||
|
2. `Ctrl/Cmd + Shift + P` > `Open in container`
|
||||||
|
|
||||||
|
The VSCode window will reload inside the dev container.
|
||||||
|
|
||||||
|
You can check that the required packages are running in the console (`Terminal` > `New Terminal`):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php -v
|
||||||
|
|
||||||
|
composer -V
|
||||||
|
|
||||||
|
git version
|
||||||
|
```
|
||||||
|
|
||||||
|
For more info, see [VSCode Remote Containers](https://code.visualstudio.com/docs/remote/containers)
|
||||||
|
Loading…
Reference in New Issue
Block a user