Giter VIP home page Giter VIP logo

devcontainer's Introduction

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

devcontainer's People

Contributors

stormmurdoc avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kesikselma

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.