config devcontainer

This commit is contained in:
António Conselheiro
2024-05-21 16:46:09 +00:00
committed by fiatjaf_
parent 1cd9847ad5
commit 296e99d2a4
3 changed files with 52 additions and 0 deletions

20
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM node:20
RUN npm install typescript -g
# Install bun
RUN curl -fsSL https://bun.sh/install | bash
RUN source /root/.bashrc
# Install just
RUN cd /usr/bin
RUN wget https://github.com/casey/just/releases/download/1.26.0/just-1.26.0-x86_64-unknown-linux-musl.tar.gz
RUN tar -xzf just-1.26.0-x86_64-unknown-linux-musl.tar.gz
RUN rm just-1.26.0-x86_64-unknown-linux-musl.tar.gz
RUN chmod +x /usr/bin/just
WORKDIR /nostr-tools
ENV LANG C.UTF-8
# The run the start script
CMD [ "/bin/bash" ]

View File

@@ -0,0 +1,19 @@
{
"name": "Nostr Tools",
"dockerComposeFile": [
"docker-compose.yml"
],
"service": "nostr-tools-dev",
"workspaceFolder": "/nostr-tools",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.vscode-typescript-next",
"eamodio.gitlens",
"dbaeumer.vscode-eslint",
"manishsencha.readme-preview",
"wix.vscode-import-cost"
]
}
}
}

View File

@@ -0,0 +1,13 @@
version: '3.9'
services:
nostr-tools-dev:
image: nostr-tools-dev
container_name: nostr-tools-dev
build:
context: ../.
dockerfile: ./.devcontainer/Dockerfile
working_dir: /nostr-tools
volumes:
- ..:/nostr-tools:cached
tty: true