|
| 1 | +# Using Dev Container for Client {{ ydb-short-name }} SDK Contributors |
| 2 | + |
| 3 | +- [Official Dev Containers Documentation](https://containers.dev/) |
| 4 | +- [VS Code Dev Containers Extension Documentation](https://code.visualstudio.com/docs/devcontainers/containers) |
| 5 | + |
| 6 | +Dev Container allows you to quickly set up a reproducible and isolated environment for developing and testing client {{ ydb-short-name }} SDKs. |
| 7 | + |
| 8 | +## Benefits of Dev Container |
| 9 | + |
| 10 | +- No need for manual environment and dependency setup. |
| 11 | +- The environment matches CI and other project contributors. |
| 12 | +- You can run integration tests with a local {{ ydb-short-name }} database without extra preparation. |
| 13 | +- All necessary tools for development and testing are pre-installed. |
| 14 | + |
| 15 | +## Getting Started |
| 16 | + |
| 17 | +1. Install a container engine (e.g., [Docker](https://www.docker.com/) or [Podman](https://podman.io/)) and [Visual Studio Code](https://code.visualstudio.com/) with the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). |
| 18 | +2. Clone the repository of the required [SDK](https://github.com/ydb-platform?q=sdk). |
| 19 | +3. If the repository contains a `.devcontainer` folder, open the project in VS Code and select **Reopen in Container**. |
| 20 | +4. After the environment starts, use standard commands to build, test, and run the code. |
| 21 | + |
| 22 | +## Implementation Details in {{ ydb-short-name }} SDKs |
| 23 | + |
| 24 | +### Java SDK |
| 25 | +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-java-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, and scripts for automatic environment setup. |
| 26 | +- The environment includes JDK, Gradle, and development tools. |
| 27 | +- You can extend the Dockerfile to install additional tools. |
| 28 | + |
| 29 | +### Go SDK |
| 30 | +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-go-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts for automatic environment setup. |
| 31 | +- All dependencies and the required Go version are pre-installed. |
| 32 | +- [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/) is installed. |
| 33 | +- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured. |
| 34 | + |
| 35 | +### JavaScript/TypeScript SDK |
| 36 | +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-js-sdk/tree/main/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts for automatic environment setup. |
| 37 | +- The environment includes Node.js, npm, TypeScript, and development tools. |
| 38 | +- [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/) is installed. |
| 39 | +- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured. |
| 40 | + |
| 41 | +### Python SDK (PR #590) |
| 42 | +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-python-sdk/pull/590/files) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts for automatic environment setup. |
| 43 | +- All dependencies, flake8, tox are pre-installed. |
| 44 | +- [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/) is installed. |
| 45 | +- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured. |
0 commit comments