Skip to content

Commit

Permalink
devcontainer setup
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-barfoot committed Apr 23, 2024
1 parent 91b2f6d commit 4c8b6d3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:18

# Install basic development tools
RUN apt update && apt install -y less man-db sudo

# Ensure default `node` user has access to `sudo`
ARG USERNAME=node
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

# Set `DEVCONTAINER` environment variable to help with orientation
ENV DEVCONTAINER=true
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// See https://containers.dev/implementors/json_reference/ for configuration reference
{
"name": "SHA-1 In Browser",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "node",
"customizations": {
"vscode": {
"extensions": [
"ritwickdey.LiveServer"
]
}
}
}

0 comments on commit 4c8b6d3

Please sign in to comment.