-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2303a0
commit 23abede
Showing
2 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARG VARIANT=dev-16-bookworm | ||
FROM mcr.microsoft.com/devcontainers/javascript-node:${VARIANT} | ||
|
||
ARG USERNAME=node | ||
ARG NPM_GLOBAL=/usr/local/share/npm-global | ||
|
||
# Add NPM global to PATH. | ||
ENV PATH=${NPM_GLOBAL}/bin:${PATH} | ||
|
||
RUN \ | ||
# Configure global npm install location, use group to adapt to UID/GID changes | ||
if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \ | ||
&& usermod -a -G npm ${USERNAME} \ | ||
&& umask 0002 \ | ||
&& mkdir -p ${NPM_GLOBAL} \ | ||
&& touch /usr/local/etc/npmrc \ | ||
&& chown ${USERNAME}:npm ${NPM_GLOBAL} /usr/local/etc/npmrc \ | ||
&& chmod g+s ${NPM_GLOBAL} \ | ||
&& npm config -g set prefix ${NPM_GLOBAL} \ | ||
&& su ${USERNAME} -c "npm config -g set prefix ${NPM_GLOBAL}" \ | ||
# Install eslint | ||
&& su ${USERNAME} -c "umask 0002 && npm install -g eslint" \ | ||
&& npm cache clean --force > /dev/null 2>&1 | ||
|
||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/universal:2", | ||
"name": "Phlask", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": "true", | ||
"username": "node", | ||
"upgradePackages": "true" | ||
}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "16" | ||
"version": "none" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "latest", | ||
"ppa": "false" | ||
} | ||
}, | ||
"onCreateCommand": "sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb", | ||
"postCreateCommand": "yarn install", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"esbenp.prettier-vscode" | ||
] | ||
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
}, | ||
"codespaces": { | ||
"openFiles": ["README.md"] | ||
} | ||
} | ||
}, | ||
"forwardPorts": [3000], | ||
"postCreateCommand": "yarn install", | ||
"remoteUser": "node" | ||
} |