Skip to content

dev-container (Debian 12) based for DevPod including neovim full featured IDE (nvChad)

Notifications You must be signed in to change notification settings

stormmurdoc/devcontainer

Repository files navigation

devcontainer (DevPod)

Build Status Use this repo to test a devcontainer with the help of devpod. This container contains a large number of development tools.

devpod overview

For further information on devpod visit devpod.sh

Table of Content

Features

This development container (Debian 12) has the following features:

  • Contains all tools for ansible development
  • Starship Cross Shell Prompt
  • Uses a customizable user account instead of root
  • Container uses persistent volume for the shell history
  • git inclusive default config
  • lf file manager incl. fzf support
  • neovim complete IDE nvchad
  • pre-commit
  • ripgrep
  • sudo command available without password
  • tmux inclusive plugins & themes
  • vim
  • zsh with syntax-highlighting & autosuggestions
  • Uses the local credentials (docker/git/ssh) from the client

Shell

Config Files

Preperation / Installation

Install the devpod cli with the following command.

macOS Silicon/ARM

curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-darwin-arm64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod

macOS Intel/AMD

curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-darwin-amd64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod

Windows

md -Force "$Env:APPDATA\devpod"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://github.com/loft-sh/devpod/releases/latest/download/devpod-windows-amd64.exe" -o $Env:APPDATA\devpod\devpod.exe;
$env:Path += ";" + $Env:APPDATA + "\devpod";
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);

Linux AMD

curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod

Linux ARM

curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-arm64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod

Usage

First prepare your provider. This example shows the docker provider.

devpod provider add docker

Type the following command to start the container.

devpod up ./ --ide none

or

devpod up https://github.com/stormmurdoc/devcontainer --ide none

or with personal dotfiles and VSCode.

devpod up ./ --dotfiles https://github.com/stormmurdoc/dotfiles --ide vscode

Currently the following IDEs are supported:

  • clion
  • fleet
  • goland
  • intellij
  • jupyternotebook
  • none
  • openvscode
  • phpstorm
  • pycharm
  • rider
  • rubymine
  • vscode
  • webstorm

The following command start your vscode and connect remotely to your development container.

devpod up https://github.com/stormmurdoc/devcontainer --ide vscode

The IDE option openvscode starts a VSCODE instance in your local browser.

openvscode

devpod vscode

Connect to your devcontainer with the following command:

ssh devcontainer.devpod

Provider Inactivity Timeout

Automatically shutdown unused workspaces to save costs with the following provider option. The following command sets the timeout to 10min for the ssh provider.

devpod provider update ssh -o INACTIVITY_TIMEOUT=10m

Provider Options

You can list the table of provider's options by using

devpod provider options ssh

zsh Shortcuts

Inside the terminal you can use the following shortcuts:

Key Command
[CTRL-o] starts lf file manager
[CTRL-n] starts neovim
[CTRL-p] run pre-commit run -av
[CTRL-l] clear screen

Neovim (nvchad) Shortcuts

Use the following shortcuts in neovim.

nvim

Key Command
[space]th change the theme
[space]ff open telescope fuzzy finder
[space]fa open telescope fuzzy finder (all files)
[space]fw open telescope live grep
[space]gt show git diff/status
[space]gb show git blame (current line)
[CTRL-n] to open nvimtree

FAQ

Attaching the Ansible Language Server to yaml files in neovim (LSP)

You can fix this by setting the correct file type for the current buffer:

:set ft=yaml.ansible

Mirror

This repo is only a mirror from a private gitea instance.

Related Links

About

dev-container (Debian 12) based for DevPod including neovim full featured IDE (nvChad)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published