Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vscode devcontainer #1467

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{
"name": "oref0",
"dockerComposeFile": [
"../docker-compose.yml",
"../docker-compose.override.yml",
"docker-compose.yml"
],
"service": "node",
"workspaceFolder": "/app",
"features": {},
"customizations": {
"vscode": {
"extensions": [
"Orta.vscode-jest",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"rvest.vs-code-prettier-eslint"
]
}
}
}
3 changes: 3 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
services:
node:
command: /bin/sh -c "while sleep 1000; do :; done"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ package-lock.json
*.pyc

bash-unit-test-temp

docker-compose.override.yml
2 changes: 2 additions & 0 deletions docker-compose.override.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
services:
node: {}
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
node:
build:
context: ./docker/node
working_dir: '/app'
volumes:
- ./:/app
6 changes: 6 additions & 0 deletions docker/node/.zshrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
zstyle ':omz:update' mode disabled
plugins=(git)

source $ZSH/oh-my-zsh.sh
7 changes: 7 additions & 0 deletions docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG NODE_VERSION="20-slim"
FROM node:${NODE_VERSION}
RUN apt update -y && apt install -y openssh-client curl zsh git vim make jq python3
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
&& chsh -s $(which zsh)
COPY .zshrc /root/.zshrc
RUN corepack enable