|
2 | 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu |
3 | 3 | { |
4 | 4 | "name": "Ubuntu", |
5 | | - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
6 | 5 | "build": { |
7 | 6 | "dockerfile": "Dockerfile", |
8 | 7 | "context": "..", |
9 | | - "args": {} |
| 8 | + "args": { |
| 9 | + "DOCKER_GID": "${env:DOCKER_GID:}" |
| 10 | + } |
10 | 11 | }, |
11 | | - "runArgs": [ |
12 | | - "--network=host" |
13 | | - ], |
14 | 12 | "mounts": [ |
| 13 | + "source=${env:HOME}${env:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind", |
15 | 14 | "source=${env:HOME}${env:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind", |
16 | | - "source=${env:HOME}${env:USERPROFILE}/.gnupg,target=/home/vscode/.gnupg,type=bind" |
| 15 | + "source=${env:HOME}${env:USERPROFILE}/.gnupg,target=/home/vscode/.gnupg,type=bind", |
| 16 | + "source=${env:HOME}${env:USERPROFILE}/.gitconfig,target=/home/vscode/.gitconfig,type=bind" |
17 | 17 | ], |
18 | | - // Features to add to the dev container. More info: https://containers.dev/features. |
19 | 18 | "features": { |
20 | 19 | "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { |
21 | 20 | "version": "latest", |
|
24 | 23 | }, |
25 | 24 | "ghcr.io/devcontainers/features/github-cli:1": {} |
26 | 25 | }, |
| 26 | + "remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}/" }, |
27 | 27 | "customizations": { |
28 | 28 | "vscode": { |
29 | 29 | "extensions": [ |
| 30 | + "AmazonWebServices.aws-toolkit-vscode", |
30 | 31 | "redhat.vscode-yaml", |
31 | 32 | "ms-python.python", |
| 33 | + "ms-python.black-formatter", |
| 34 | + "ms-python.flake8", |
| 35 | + "ms-python.pylint", |
32 | 36 | "eamodio.gitlens", |
33 | 37 | "github.vscode-pull-request-github", |
34 | | - "orta.vscode-jest", |
35 | 38 | "42crunch.vscode-openapi", |
36 | 39 | "mermade.openapi-lint", |
37 | | - "rvest.vs-code-prettier-eslint", |
38 | | - "dbaeumer.vscode-eslint", |
39 | 40 | "lfm.vscode-makefile-term", |
40 | 41 | "GrapeCity.gc-excelviewer", |
41 | 42 | "redhat.vscode-xml", |
42 | 43 | "streetsidesoftware.code-spell-checker", |
43 | 44 | "timonwong.shellcheck", |
44 | 45 | "github.vscode-github-actions", |
45 | | - "ms-python.pylint", |
46 | | - "ms-python.black-formatter", |
47 | 46 | "jimasp.behave-vsc", |
48 | 47 | "Gruntfuggly.todo-tree" |
49 | 48 | ], |
50 | 49 | "settings": { |
51 | | - "python.defaultInterpreterPath": "/workspaces/electronic-prescription-service-api-regression-tests/.venv/bin/python", |
| 50 | + "python.defaultInterpreterPath": "/home/vscode/.asdf/shims/python", |
52 | 51 | "python.analysis.autoSearchPaths": true, |
53 | 52 | "python.analysis.extraPaths": [], |
54 | 53 | "python.testing.unittestEnabled": false, |
55 | | - "python.testing.pytestEnabled": false, |
56 | | - "python.linting.enabled": true, // required to format on save |
57 | | - "python.experiments.optOutFrom": [ |
58 | | - "pythonTestAdapter" |
59 | | - ], |
60 | | - "editor.defaultFormatter": "rvest.vs-code-prettier-eslint", |
61 | | - "editor.formatOnPaste": false, // required |
62 | | - "editor.formatOnType": false, // required |
63 | | - "editor.formatOnSave": true, // optional |
| 54 | + "python.testing.pytestEnabled": true, |
| 55 | + "python.linting.pylintEnabled": true, |
| 56 | + "python.linting.flake8Enabled": true, |
| 57 | + "python.linting.enabled": true, |
| 58 | + "python.formatting.provider": "black", |
| 59 | + "black-formatter.args": ["--line-length=120"], |
| 60 | + "[python]": { |
| 61 | + "editor.defaultFormatter": "ms-python.black-formatter" |
| 62 | + }, |
| 63 | + "editor.formatOnPaste": false, |
| 64 | + "editor.formatOnType": false, |
| 65 | + "editor.formatOnSave": true, |
64 | 66 | "editor.formatOnSaveMode": "file", |
65 | 67 | "cSpell.words": [ |
66 | 68 | "fhir", |
67 | 69 | "Formik", |
68 | 70 | "pino", |
69 | | - "serialisation" |
70 | | - ] |
| 71 | + "serialisation", |
| 72 | + "behave", |
| 73 | + "gherkin", |
| 74 | + "epsam", |
| 75 | + "bedrock", |
| 76 | + "allure" |
| 77 | + ], |
| 78 | + "python.experiments.optOutFrom": ["pythonTestAdapter"] |
71 | 79 | } |
72 | 80 | } |
73 | 81 | }, |
74 | | - "remoteEnv": { |
75 | | - "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" |
76 | | - }, |
77 | | - "postCreateCommand": "rm -f ~/.docker/config.json; git config --global --add safe.directory /workspaces/electronic-prescription-service-api-regression-tests; make install; docker build -f https://raw.githubusercontent.com/NHSDigital/eps-workflow-quality-checks/refs/heads/main/dockerfiles/nhsd-git-secrets.dockerfile -t git-secrets . && poetry run pre-commit install --install-hooks -f" |
78 | | - // "features": {}, |
79 | | - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
80 | | - // "forwardPorts": [], |
81 | | - // Use 'postCreateCommand' to run commands after the container is created. |
82 | | - // "postCreateCommand": "" |
83 | | - // Configure tool-specific properties. |
84 | | - // "customizations": {}, |
85 | | - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
86 | | - // "remoteUser": "root" |
| 82 | + "postCreateCommand": "rm -f ~/.docker/config.json; git config --global --add safe.directory /workspaces/electronic-prescription-service-api-regression-tests; source ~/.bashrc; export PATH=\"/home/vscode/.asdf/shims:$PATH\"; make install" |
87 | 83 | } |
0 commit comments