-
-
Notifications
You must be signed in to change notification settings - Fork 530
Devcontainer improvement #1766
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
base: trunk
Are you sure you want to change the base?
Devcontainer improvement #1766
Changes from all commits
b9c2cac
455041a
d9e02d6
f5fc3b7
a7b6966
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| FROM mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm | ||
|
|
||
| RUN apt-get update \ | ||
| && export DEBIAN_FRONTEND=noninteractive \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| libasound2 \ | ||
| libatk-bridge2.0-0 \ | ||
| libgbm1 \ | ||
| libgtk-3-0 \ | ||
| libinput-dev \ | ||
| libnss3 \ | ||
| libudev-dev \ | ||
| libxshmfence1 \ | ||
| xvfb \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "name": "Stretchly Dev", | ||
| "build": { | ||
| "dockerfile": "Dockerfile", | ||
| "context": ".." | ||
| }, | ||
| "workspaceFolder": "/workspaces/stretchly", | ||
| "remoteUser": "node", | ||
| "updateRemoteUserUID": true, | ||
| "runArgs": [ | ||
| "--init", | ||
| "--network=host" | ||
| ], | ||
| "mounts": [ | ||
| "source=stretchly-node-modules,target=/workspaces/stretchly/node_modules,type=volume", | ||
| "source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,type=bind,readonly", | ||
| "source=${localEnv:HOME}/.gitconfig,target=/home/node/.gitconfig,type=bind,readonly", | ||
| "source=${localEnv:HOME}/.npmrc,target=/home/node/.npmrc,type=bind,readonly" | ||
| ], | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/git:1": {} | ||
| }, | ||
| "initializeCommand": "touch ~/.gitconfig ~/.npmrc", | ||
| "postCreateCommand": "sudo mkdir -p /workspaces/stretchly/node_modules && sudo chown -R node:node /workspaces/stretchly/node_modules && npm install && find node_modules/.bin -maxdepth 1 -type l -exec sh -c 'chmod u+x \"$(readlink -f \"$0\")\"' {} \\;", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's this doing? |
||
| "forwardPorts": [ | ||
| 9222 | ||
| ], | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "dbaeumer.vscode-eslint", | ||
| "vitest.explorer" | ||
| ], | ||
| "settings": { | ||
| "eslint.validate": [ | ||
| "javascript" | ||
| ], | ||
| "editor.codeActionsOnSave": { | ||
| "source.fixAll.eslint": "explicit" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| "scripts": { | ||
| "start": "electron .", | ||
| "dev": "cross-env NODE_ENV=development electron . --trace-warnings --trace-deprecation --enable-logging --remote-debugging-port=9222", | ||
| "dev:container": "cross-env NODE_ENV=development electron . --no-sandbox --trace-warnings --trace-deprecation --enable-logging --remote-debugging-port=9223 --remote-allow-origins=*", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. --remote-allow-origins=* is broad; --remote-allow-origins=http://localhost:9223 would be safer?
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, is there reason to use 9223? |
||
| "postinstall": "electron-builder install-app-deps", | ||
| "pack": "electron-builder build --dir", | ||
| "dist": "electron-builder build", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we make it use .nvmrc version? so I don't have to remember update this. Each Electron version is with specific node version so best to keep it in sync.