Skip to content

Commit

Permalink
add VS code configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
hiro5id committed Feb 6, 2023
1 parent 4158713 commit a526bf6
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM node:14-bullseye

# node may come with an older version of npm. Ensure we have a specific npm.
#RUN npm install -g [email protected]


# add a repository that has a newer version of Git than the one available in the default Debian Jessie repository
#RUN echo "deb http://ftp.debian.org/debian stretch main" | tee -a /etc/apt/sources.list

################################################################################
# Install prerequisites
RUN apt update
RUN apt install -y \
curl \
git



# Add non-root user
ARG USERNAME=node
ARG USER_UID=1000
ARG USER_GID=$USER_UID


# Create the user (don't need to if it already exists)
#RUN groupadd --gid $USER_GID $USERNAME \
# && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
RUN apt update \
&& apt install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

## Make sure to reflect new user in PATH
#ENV PATH="/home/${USERNAME}/.local/bin:${PATH}"
USER $USERNAME


###### Install NVM ################################################################################
# Install nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
###### Finished install NVM ################################################################################
89 changes: 89 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "console-log-json",
"dockerComposeFile": [
"docker-compose.yml"
],
// The name of the following service has to match one of the services in docker-compose.yml
"service": "devcontainer",
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"remoteUser": "node",
"customizations": {
"vscode": {
"extensions": [
"VisualStudioExptTeam.vscodeintellicode",
"VisualStudioExptTeam.intellicode-api-usage-examples",
"VisualStudioExptTeam.vscodeintellicode-completions",
"mintlify.document",
"mgmcdermott.vscode-language-babel",
"shakram02.bash-beautify",
"vikas.code-navigation",
"ezforo.copy-relative-path-and-line-numbers",
"RandomFractalsInc.vscode-data-preview",
"ms-azuretools.vscode-docker",
"p1c2u.docker-compose",
"formulahendry.docker-explorer",
"QuentinGruber.dockerfiletemplate",
"codeandstuff.vscode-navigate-edit-history",
"dbaeumer.vscode-eslint",
"GrapeCity.gc-excelviewer",
"sleistner.vscode-fileutils",
"mhutchie.git-graph",
"donjayamanne.githistory",
"huizhou.githd",
"letmaik.git-tree-compare",
"bierner.github-markdown-preview",
"eamodio.gitlens",
"NikolaosGeorgiou.html-fmt-vscode",
"P-de-Jong.vscode-html-scss",
"sburg.vscode-javascript-booster",
"redhat.vscode-yaml",
"DotJoshJohnson.xml",
"redhat.vscode-xml",
"hogashi.vscode-copy-github-permalink",
"henrynguyen5-vsc.vsc-nvm",
"Retsam19.typescript-types-view",
"pmneo.tsimporter",
"rbbit.typescript-hero",
"loiane.ts-extension-pack",
"kakumei.ts-debug",
"hbenl.vscode-test-explorer",
"mechatroner.rainbow-csv",
"kahnpro.quick-browser",
"gencer.html-slim-scss-css-class-completion",
"kbysiec.vscode-search-everywhere",
"mlewand.select-part-of-word",
"jack89ita.open-file-from-path",
"sysoev.vscode-open-in-github",
"mushan.vscode-paste-image",
"ionutvmi.path-autocomplete",
"mskelton.npm-outdated",
"idered.npm",
"raynigon.nginx-formatter",
"ahmadalli.vscode-nginx-conf",
"shd101wyy.markdown-preview-enhanced",
"yzhang.markdown-all-in-one",
"jiejie.Lua-Nginx-Snippets",
"ritwickdey.LiveServer",
"kavod-io.vscode-jest-test-adapter"
]
}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
15 changes: 15 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.7'

services:
devcontainer:
image: sebestyen/console-log-json-dev-container:0.1
build: .
container_name: console-log-json-dev-container
hostname: console-log-json-dev.local
working_dir: /workspace
volumes:
# mount the source code into the container
- ..:/workspace
# mount any other folders into the container
#- ~/.aws:/home/node/.aws
command: sleep infinity
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"docwriter.style": "Auto-detect"
}

0 comments on commit a526bf6

Please sign in to comment.