diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..a52db72e6 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,9 @@ +FROM mcr.microsoft.com/devcontainers/java:1-21-bullseye + +ENV MAVEN_CONFIG=/var/maven/.m2 + +# [Optional] Uncomment if you want to install more tools +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends maven \ + && mkdir -p /var/maven/.m2 \ + && chown -R vscode:vscode /var/maven/.m2 diff --git a/.devcontainer/commands/initialize.sh b/.devcontainer/commands/initialize.sh new file mode 100755 index 000000000..68f335c6d --- /dev/null +++ b/.devcontainer/commands/initialize.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +git config --local user.name "$(git config user.name)" +git config --local user.email "$(git config user.email)" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..882dfc62b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/java +{ + "name": "YDB Java SDK", + "dockerFile": "Dockerfile", + // Allows the container to use ptrace, which is useful for debugging. + "capAdd": [ + "SYS_PTRACE" + ], + // Disables seccomp, which can be necessary for some debugging tools to function correctly. + "securityOpt": [ + "seccomp=unconfined" + ], + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} + }, + // Use 'initializeCommand' to run commands before the container is created. + "initializeCommand": "chmod +x .devcontainer/commands/initialize.sh && .devcontainer/commands/initialize.sh", + // Use 'postCreateCommand' to run commands after the container is created. + // Use 'postStartCommand' to run commands after the container is started. + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "redhat.java", + "vscjava.vscode-java-pack" + ] + } + }, + // Maven cache volume configuration. + "mounts": [ + "source=maven-cache,target=/var/maven/.m2,type=volume" + ] +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..f33a02cd1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly diff --git a/.gitignore b/.gitignore index 546ecffcc..2fc7e26df 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ **/.idea/ **/*.iml **/*.iws -**/*.ipr \ No newline at end of file +**/*.ipr + +# VS Code +.vscode \ No newline at end of file