Container images for portable development environments

Overview

Docker Dev

Spin up a container to develop from anywhere!

docker-dev

To run, just:

docker run -ti aghost7/nodejs-dev:boron tmux new

Alternatively, if on Linux:

python3 -m pip install --user slipway
slipway start aghost7/nodejs-dev:carbon

Terminal

Lately, I've been using alacritty. You can find my configurations here. Gnome terminal and/or iTerm2 works fine though.

Images

Language Images

  • ubuntu-dev-base: Ubuntu image with a few presets such as docker of already installed. It is also configured to allow passwordless sudo just like those vagrant images. Tags available:
    • focal: Ubuntu Focal Fossa (20.04) image.
  • power-tmux: Powerline + Tmux. Based from the ubuntu-dev-base image. Images available:
    • focal
  • nvim: NeoVim image. Based from ubuntu-tmux. Language agnostic vim setup (no language-specific plugins in there). Images available:
    • focal
  • nodejs-dev: nvm + nodejs specific configurations. Tags available:
    • focal-erbium: Ubuntu 20.04 + NodeJs 12.
    • focal-fermium: Ubuntu 20.04 + NodeJs 14.
  • rust-dev: NeoVim configuration and autocomplete for the Rust language.
    • focal-stable uses rust stable with YouCompleteMe backed by only racer.
    • focal-nightly uses rust nightly with deoplete backed by RLS.
  • py-dev: Python configuration with autocomplete for python and ptpython.
    • focal: Ubuntu 20.04 + python 3.8
  • ruby-dev: Ruby image with language server. Tags:
    • focal: Ruby 2.3 pre-installed.
  • c-dev: Ubuntu Bionic image for c development with cquery for completions.
    • focal: Ubuntu 20.04 + clangd
  • deno-dev: Ubuntu Bionic image for deno development with bash completions. Tags Available:
    • bionic: Ubuntu 18.4 + Deno v1.0
  • devops: Python image with additional tools (e.g., terraform) for devops related tasks. Images available:
    • focal

Database Images

  • pg-dev: Postgresql image with pgcli, a command line client with autocompletions and syntax highlighting. Tags correspond to the Postgresql version:
    • 9.6
    • 10
    • 11
  • my-dev: MySql image with mycli utility. Tags correspond to the mysql version:
    • 5.6
    • 5.7
    • 8.0
  • mongo-dev: Official mongodb image with Mongo Hacker added. Tags correspond to the mongdb version:
    • 4.1
  • redis-dev: Redis image with iredis included. Tags available:
    • 6

Vim Configuration

Vim configurations are broken down into three parts:

  • init.vim: This is the equivalent for .vimrc in NeoVim.
  • plugin.vim: This contains all plugins which will be installed using vim.plug.
  • post-plugin.vim: Contains all plugin-specific configurations for Neovim. Configurations which aren't plugin-specific reside in the init.vim file.

Breaking it down this way allows one to just run cat addition.vim >> $XDG_CONFIG_PATH/file to add new plugins and configs for specific programing languages and libraries.

Calling Docker on the Host

The docker daemon run over a socket. The command line tool is just a client to the daemon. In other words, if we make the socket connectable from within the container we're in business.

For some reason it needs privileged to work as well.

docker run -ti --rm \
	--privileged \
	-v `readlink -f /var/run/docker.sock`:/var/run/docker.sock \
	aghost7/ubuntu-dev-base:latest \
	tmux new

SSH Forwarding and Git

For ssh, just pass the socket over to the container.

docker run -ti --rm \
	-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK \
	-e SSH_AUTH_SOCK=$SSH_AUTH_SOCK \
	aghost7/ubuntu-dev-base:latest \
	tmux new

I like to avoid having to reconfigure git every time, so I mount a volume for .gitconfig. ~/.ssh/known_hosts is also anoying.

Getting the Clipboard Working

Basically, X11 is built in a manner that allows sending display data over the wire. I've managed to run GUI applications from a headless server through an ssh connection in the past. The way I'm doing this is through the same old unix socket trick for controlling the docker daemon that's on the host machine.

docker run -ti --rm \
	-e DISPLAY=$DISPLAY \
	-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
	aghost7/ubuntu-dev-base:latest bash

On the host you'll need to disable one of the security features in X11.

xhost +si:localuser:$USER > /dev/null

Source: http://stackoverflow.com/questions/25281992/alternatives-to-ssh-x11-forwarding-for-docker-containers

Build your own

There is a tutorial which can be found here.

Owner
Jonathan Boudreau
Jonathan Boudreau
dsub is a command-line tool that makes it easy to submit and run batch scripts in the cloud.

Open-source command-line tool to run batch computing tasks and workflows on backend services such as Google Cloud.

Data Biosphere 233 Jan 01, 2023
CLI tool to computes CO2 emissions of HPC computations following green-algorithms.org methodology

gqueue gqueue is a CLI (command line interface) tool that computes carbon footprint of HPC computations on clusters running slurm. It follows the meth

4 Dec 10, 2021
A CLI minesweeper application written in 60 LoC python

This is a CLI minesweeper application written in 60 LoC python. You can use d row,column to dig and f row,column to flag/unflag

1 Dec 21, 2021
Animefetch is an anime command-line system information tool written in python

Animefetch - v0.0.3 An anime command-line system information tool written in python. Description Animefetch is an anime command-line system informatio

Thadeuks 6 Jun 17, 2022
cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored in many CMSIS PACKs

cmsis-pack-manager cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored i

pyocd 20 Dec 21, 2022
Interact with Replit remotely with the Replit CLI

Replit CLI pip install repl-cli Welcome to Replit CLI! With the Replit CLI Application, you can work with your repls locally, including clone, pull,

Shuchir Jain 4 Aug 18, 2022
pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery.

pypinfo: View PyPI download statistics with ease. pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery. Installation pypin

Ofek Lev 351 Dec 26, 2022
A simple command line virtual operating system, written in python

Virtual operating system A simple virtual operating system written in python. (Under development). Currently, the following commands are supported: Co

B.Jothin kumar 7 Nov 15, 2022
Booky - A command line utility for bookmarking files on your terminal!

Booky A command line utility for bookmarking files for quick access With it you can: Bookmark and delete your (aliases of) files at demand Launch them

Pran 1 Sep 11, 2022
A supercharged Git/GitHub command line interface (CLI)

A supercharged Git/GitHub command line interface (CLI).

Donne Martin 7.4k Jan 07, 2023
Unpacks things.

$ unp_ unp is a command line tool that can unpack archives easily. It mainly acts as a wrapper around other shell tools that you can find on v

Armin Ronacher 405 Jan 03, 2023
Kubernetes shell: An integrated shell for working with the Kubernetes

kube-shell Kube-shell: An integrated shell for working with the Kubernetes CLI Under the hood kube-shell still calls kubectl. Kube-shell aims to provi

CloudNative Labs 2.2k Jan 08, 2023
Lsp Plugin for working with Python virtual environments

py_lsp.nvim What is py_lsp? py_lsp.nvim is a neovim plugin that helps with using the lsp feature for python development. It tackles the problem about

Patrick Haller 55 Dec 27, 2022
A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.

A command line stock market / portfolio tracker originally insipred by Ericm's Stonks program, featuring unicode for incredibly high detailed graphs even in a terminal.

Conrad Selig 51 Nov 29, 2022
Dynamically Generate GitHub Stats as like Terminal Interface

GitHub Stats Terminal Style Dynamically Generate GitHub Stats as like Terminal Interface Usage Create a New Repository using this Template or click he

YOGESHWARAN R 63 Jan 03, 2023
iTerm2 Shell integration for Xonsh shell.

iTerm2 Shell Integration iTerm2 Shell integration for Xonsh shell. Installation To install use pip: xpip install xontrib-iterm2 # or: xpip install -U

Noorhteen Raja NJ 6 Dec 29, 2022
An anime command-line system information tool written in python.

Animefetch - v0.0.3 An anime command-line system information tool written in python. Description Animefetch is an anime command-line system informatio

Thadeuks 6 Jun 17, 2022
Yet another bash/zsh prompt script

Here we have yet another script for Git-aware customization of the command prompt in Bash and zsh. Unlike all the other scripts, I wrote this one, so

John T. Wodder II 5 Oct 13, 2021
My dotfiles -My configuration, with installations steps.

.dotfiles My configuration, with installations steps. Installation Oh My ZSH Install with this command: sh -c "$(curl -fsSL https://raw.githubusercont

Luca Angioloni 4 Dec 14, 2022
The most comprehensive, exhaustive, parameterized command-line wordle solver.

Wordle Solver The most comprehensive, exhaustive, parameterized command-line wordle solver. Wordle is a real

Debarghya Das 27 Nov 21, 2022