Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ronalddddd/docker-dev-container

Open more actions menu

Repository files navigation

docker-dev-container

A containerized development environment.

Features

  • zsh (OhMyZsh)
  • git
  • fzf with keybindings
    • alt c for fuzzy directory search + cd
    • ctrl t for fuzzy file path search + paste
    • ctrl r for fuzzy history search
  • vim 8 customized with plugins and some other configured defaults (see vimrc)
    • ctrl o File Browser (NERDTree)
    • ctrl p File quick open (ctrlp)
    • ctrl n Multi-cursor (vim-multiple-cursors)
    • Auto-format (vim-prettier)
    • Auto-complete (YouCompleteMe)
    • Syntax checking (syntastic)
  • Mosh - mobile shell eliminates ssh disconnects over unstable networks
  • tmux with some light configurations (see tmux)
  • node.js and yarn
  • devops/cloud tools
    • Ansible
    • Terraform
    • kubectl
    • k9s -- Terminal UI for k8s
    • AWS CLI
    • doctl -- DigitalOcean's CLI tool

Quick Start

Connecting via docker-compose

  • mounts (read-only) ${SSH_DIR}, defaults to ~/.ssh
  • mounts ${WORKSPACE_DIR}, defaults to ./workspace
  • mounts various config folders under ./workspace into home:
    • .config
    • .kube
    • .aws
docker-compose up -d
docker-compose exec workspace zsh

Connecting via SSH

# Start the container
docker run -d -e SSH_PASSWORD="supersecret" -p 2233:22 ronalddddd/dev-container

# Shell into it
ssh root@localhost -p 2233

Connecting via Mosh

mosh root@localhost -p 6000 --ssh="ssh -p 1234"

Advanced Usages

  • SSH into it using your private key by setting the environment variable DEVELOPER_PUBLIC_KEY
  • Mount a project folder to /projects (so you don't lose your work :)
  • Mount a .ssh folder with required credentials
    • authorized_keys file for logging in
    • Private keys for accessing remote repositories, etc...
  • Expose SSH port
  • Expose Mosh port range (UDP 6000 to 6100)

What is Mosh?

Mosh is a replacement for interactive SSH terminals. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.

keeps the session alive if the client goes to sleep and wakes up later, or temporarily loses its Internet connection

  • getting a mosh client: https://mosh.org/#getting
  • you need to expose one or more UDP ports in the 6000 to 6100 range for mosh clients to connect

Screenshots

Vim

Screenshot of vim running in a tmux session

About

A vim development environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.