Skip to content

Commit

Permalink
Added custom dockerfile with nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
devjgm committed Dec 14, 2023
1 parent e509dd3 commit 0cc336c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 29 deletions.
34 changes: 34 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
32 changes: 3 additions & 29 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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",
}
}

0 comments on commit 0cc336c

Please sign in to comment.