Skip to content

Commit d275fc4

Browse files
committed
add vscode devcontainer
1 parent 3430f6b commit d275fc4

File tree

7 files changed

+49
-1
lines changed

7 files changed

+49
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
3+
{
4+
"name": "oref0",
5+
"dockerComposeFile": [
6+
"../docker-compose.yml",
7+
"../docker-compose.override.yml",
8+
"docker-compose.yml"
9+
],
10+
"service": "node",
11+
"workspaceFolder": "/app",
12+
"features": {},
13+
"customizations": {
14+
"vscode": {
15+
"extensions": [
16+
"Orta.vscode-jest",
17+
"dbaeumer.vscode-eslint",
18+
"esbenp.prettier-vscode",
19+
"rvest.vs-code-prettier-eslint"
20+
]
21+
}
22+
}
23+
}

.devcontainer/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
services:
2+
node:
3+
command: /bin/sh -c "while sleep 1000; do :; done"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ package-lock.json
2727
*.pyc
2828

2929
bash-unit-test-temp
30-
30+
docker-compose.override.yml

docker-compose.override.yml.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
services:
2+
node: {}

docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
node:
3+
build:
4+
context: ./docker/node
5+
working_dir: '/app'
6+
volumes:
7+
- ./:/app

docker/node/.zshrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export ZSH="$HOME/.oh-my-zsh"
2+
ZSH_THEME="robbyrussell"
3+
zstyle ':omz:update' mode disabled
4+
plugins=(git)
5+
6+
source $ZSH/oh-my-zsh.sh

docker/node/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ARG NODE_VERSION="20-slim"
2+
FROM node:${NODE_VERSION}
3+
RUN apt update -y && apt install -y openssh-client curl zsh git vim make jq python3
4+
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
5+
&& chsh -s $(which zsh)
6+
COPY .zshrc /root/.zshrc
7+
RUN corepack enable

0 commit comments

Comments
 (0)