From 4c8b6d3cf03f1037c1a6c2179d44185d40cd2911 Mon Sep 17 00:00:00 2001 From: Theo Barfoot Date: Tue, 23 Apr 2024 10:17:41 +0000 Subject: [PATCH] devcontainer setup --- .devcontainer/Dockerfile | 12 ++++++++++++ .devcontainer/devcontainer.json | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..fe1968b --- /dev/null +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..e7d5ae0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" + ] + } +} +}