Skip to content

Commit

Permalink
add devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
LimpidCrypto committed Jan 8, 2024
1 parent 095f5c4 commit 4ace744
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/devcontainers/rust:1.0-1-bullseye

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https:/devcontainers/templates/tree/main/src/rust
{
"name": "xrpl-rust",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
// {
// "source": "devcontainer-cargo-cache-${devcontainerId}",
// "target": "/usr/local/cargo",
// "type": "volume"
// }
// ]
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustup --version",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"Gydunhn.vsc-essentials",
"GitHub.copilot",
"swellaby.rust-pack",
"panicbit.cargo",
"vadimcn.vscode-lldb",
"tamasfe.even-better-toml"
],
"settings": {
"files.autoSave": "onFocusChange",
"files.eol": "\n",
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
}
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
10 changes: 10 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"

services:
app:
build:
context: .
dockerfile: Dockerfile
command: sleep infinity
volumes:
- ../..:/workspaces:cached

0 comments on commit 4ace744

Please sign in to comment.