From 0cc336c0b574c82e064e4f2556a47aef9f4d26b2 Mon Sep 17 00:00:00 2001 From: Greg Miller Date: Thu, 14 Dec 2023 11:57:47 -0500 Subject: [PATCH] Added custom dockerfile with nvim --- .devcontainer/Dockerfile | 34 +++++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 32 +++---------------------------- 2 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..6673bd5 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,34 @@ +FROM ubuntu:22.04 +ARG USERNAME=sumcol + +RUN apt update -y && apt upgrade -y && apt install -y \ + build-essential \ + zsh \ + fish \ + neovim \ + cmake \ + iputils-ping \ + traceroute \ + strace \ + sudo \ + curl \ + llvm \ + llvm-15 \ + llvm-15-dev \ + pkg-config \ + libudev-dev \ + rsync \ + git \ + htop \ + less + +RUN useradd -m $USERNAME \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME +USER $USERNAME + +# Install Rust +ENV SHELL /bin/bash +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="$HOME/.cargo/bin:$PATH" +RUN cargo install ripgrep fd-find \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f8fff10..2bdf292 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,31 +1,5 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/rust { - "name": "Rust", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye" - - // Use 'mounts' to make the cargo cache persistent in a Docker Volume. - // "mounts": [ - // { - // "source": "devcontainer-cargo-cache-${devcontainerId}", - // "target": "/usr/local/cargo", - // "type": "volume" - // } - // ] - - // 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": "rustc --version", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + "build": { + "dockerfile": "Dockerfile", + } }