diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..525f81c --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,42 @@ +# Devcontainers + +Use [Devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) to prepare a fully automated working environment. + +Generate the `devcontainer.json` executing: + +```shell +cd .devcontainer +./generate_devcontainer.sh +``` + +Now you should see the file `.devcontainer/devcontainer.json`. At this point you can use your favorite IDE to run Devcontainers + +## VSCode + +Install the extension https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers + +To open the repository with DevContainers do `Ctrl + Shift + P` and enter `Dev Containers: Rebuild and Reopen in Container`. For more options see the Extension documentations. + +### Docker + +Docker defaults should work fine therefore there is nothing to do. + +### Podman + +Start Podman service for a regular user (rootless) and make it listen to a socket: + +```shell +systemctl --user enable --now podman.socket +``` + +Restart your OS if necessary and verify that podman listens: + +```shell +systemctl --user status podman.socket +``` + +Go to the Extension Settings: + +- `Dev › Containers: Docker Compose Path` set `podman-compose` +- `Dev › Containers: Docker Path` set `podman` +- `Dev › Containers: Docker Socket Path` set `/run/podman/podman.sock` \ No newline at end of file diff --git a/.devcontainer/template.json b/.devcontainer/template.json index df71976..5b747e9 100644 --- a/.devcontainer/template.json +++ b/.devcontainer/template.json @@ -1,5 +1,5 @@ { - "name": "trustify-ui-tests", + "name": "trustify-tests", "build": { "dockerfile": "Dockerfile" }, @@ -25,20 +25,12 @@ "label": "real vnc" } }, - "onCreateCommand": "npx playwright install-deps && npx playwright install", - "postCreateCommand": "npm ci", "customizations": { "vscode": { "extensions": [ - "k--kato.intellij-idea-keybindings", - "vadimcn.vscode-lldb", "ms-playwright.playwright", "alexkrechik.cucumberautocomplete", - "github.vscode-pull-request-github", - "GitHub.github-vscode-theme", - "esbenp.prettier-vscode", - "oderwat.indent-rainbow", - "eamodio.gitlens" + "esbenp.prettier-vscode" ] } }