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
A CLI for creating styled-components for React projects quickly

new-component Ian Cleary (iancleary) Description Welcome! This is a CLI for creating styled-components for React projects quickly. Note: I've rewrote

Ian Cleary (he/him/his) 1 Feb 15, 2022
🌈 Lightweight Python package that makes it easy and fast to print terminal messages in colors. 🌈

🌈 Colorist for Python 🌈 Lightweight Python package that makes it easy and fast to print terminal messages in colors. Prerequisites Python 3.9 or hig

Jakob Bagterp 1 Feb 05, 2022
Pequeno joguinho pra você rodar no seu terminal

JokenPython Pequeno joguinho pra você rodar no seu terminal Olá! Joguinho legal pra vc rodar no seu terminal!! (rode no terminal, pra melhor experienc

Scott 4 Nov 25, 2021
A command line application to analyse reports from TBC Warcraft Logs.

README A command line application to analyse reports from TBC Warcraft Logs. The application was written and tested with Python 3.9. Features Dumps an

2 Dec 17, 2021
A CLI tool for using GLIDE to generate images from text.

Text-Glided-Diffusion Installation First clone this repository: git clone https://github.com/afiaka87/text-glided-diffusion.git cd text-glided-diffusi

Clay Mullis 68 Dec 30, 2022
Wordle for CLUE - WORDLE clone for Adafruit Clue

Wordle_for_CLUE This project is a clone of the very popular word solving puzzle

Michael Lacock 4 Feb 15, 2022
CLI to show end-of-life dates for tools and technologies.

Python 3.9+ interface to endoflife.date to show end-of-life dates for tools and technologies.

Hugo van Kemenade 32 Jan 06, 2023
Command-line parsing library for Python 3.

Command-line parsing library for Python 3.

36 Dec 15, 2022
Apple Silicon 'top' CLI

asitop pip install asitop What A nvtop/htop style/inspired command line tool for Apple Silicon (aka M1) Macs. Note that it requires sudo to run due to

Timothy Liu 1.2k Dec 31, 2022
Doing set operations on files considered as sets of lines

CLI tool that can be used to do set operations like union on files considering them as a set of lines. Notes It ignores all empty lines with whitespac

Partho 11 Sep 06, 2022
A CLI password generator

passgen - A CLI password generator Usage python3 main.py arguments Arguments Argument Short Description --length -l The length of the password to ge

1 Nov 13, 2021
Albert launcher extension for converting units of length, mass, speed, temperature, time, current, luminosity, printing measurements, molecular substance, and more

unit-converter-albert-ext Extension for converting units of length, mass, speed, temperature, time, current, luminosity, printing measurements, molecu

Jonah Lawrence 2 Jan 13, 2022
ghfetch is ai customizable CLI GitHub personal README generator.

ghfetch is ai customizable CLI GitHub personal README generator. Inspired by famous fetch such as screenfetch, neofetch and ufetch, the purpose of this tool is to introduce yourself as if you were a

Alessio Celentano 3 Sep 10, 2021
commandline version of wordle game and my auto solver.

Wordle Machine (and Wordle Game) (in commandline) My implementation of the Wordle game (inspired by https://www.powerlanguage.co.uk/wordle/) and my in

Kevin Xu 11 Jan 03, 2023
Command line tool to keep track of your favorite playlists on YouTube and many other places.

Command line tool to keep track of your favorite playlists on YouTube and many other places.

Wolfgang Popp 144 Jan 05, 2023
Zecwallet-Python is a simple wrapper around the Zecwallet Command Line LightClient written in Python

A wrapper around Zecwallet Command Line LightClient, written in Python Table of Contents About Installation Usage Examples About Zecw

Priveasy 2 Sep 06, 2022
eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.

Command line utilities for tabular data files This is a set of command line utilities for manipulating large tabular data files. Files of numeric and

eBay 1.4k Jan 09, 2023
git-partial-submodule is a command-line script for setting up and working with submodules while enabling them to use git's partial clone and sparse checkout features.

Partial Submodules for Git git-partial-submodule is a command-line script for setting up and working with submodules while enabling them to use git's

Nathan Reed 15 Sep 22, 2022
swarmexec executes command in swarm service

Swarmexec swarmexec executes command in swarm service Install pip install git+https://github.com/filimon43g/swarmexec.git Config In swarm_config.ini

Phil 2 Nov 23, 2021
Pyreadline3 - Windows implementation of the GNU readline library

pyreadline3 The pyreadline3 package is based on the stale package pyreadline loc

32 Jan 06, 2023