Skip to content
Develop and share terminal environments
Branch: master
Clone or download
Latest commit 60b3d50 Jun 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github add pull_request_template May 31, 2019
templates auto generate ssh-key and authorized_keys Jun 3, 2019
.all-contributorsrc docs: update .all-contributorsrc Jun 9, 2019
.gitignore remove tmux_saves and ignore May 28, 2019
Dockerfile Add nano Jun 6, 2019
LICENSE Add MIT license May 31, 2019
README.md docs: update README.md Jun 9, 2019
myos.gif add git to README Jun 1, 2019
myos.sh Update myos.sh Jun 9, 2019

README.md

License: MIT Discord All Contributors

MyOS - Develop and Share Linux Environments

If you like the project, please remember to star it so we can grow the community!

Blog post about MyOS | Dockerhub

If you want your environment listed in the showcase, please submit a PR

High Level

Uses Docker + Docker Compose to provide a consistent and reproducible build environment. Base image assumes the minimum while still being useful out of the box.

Usage

Assumptions

Everything depends on myos base Docker image. This image is available on Dockerhub, but you may also build it using the included Dockerfile.

OSX Users: For display forwarding to work, you'll need to have X11 Quartz. It's crappy and I'd love to find an alternative.

Ctrl-D is the most sure fire way of getting out of the container

Setup

  1. Clone the repo

    $ git clone https://github.com/rylandg/myos.git
  2. Alias the CLI or add it to your PATH

    alias myos="/path/to/myos/repo/myos.sh"
  3. Create a template environment with empty config files

    $ myos init ./somepath/
    $ ls somepath
      vim tmux zsh docker-compose.yml
  4. Enter directory and create your environment

    $ cd somepath
    $ myos create testmyos 
  5. Connect to the environment via ssh

    $ myos connect testmyos
  6. Bring down the environment when you're done (this can lose data)

    $ myos remove testmyos

Advanced usage

Assuming you've already installed the tool, my personal configuration can be used to test out MyOS.

  1. Clone my personal MyOS config
$ git clone https://github.com/rylandg/rylandg-myosfiles
  1. Create a MyOS based on my setup
$ cd rylandg-myosfiles
$ myos create rysetup
$ myos connect rysetup

API

Init

myos init <dir>

Creates the initial templates that the default docker-compose.yml expects. These are...

# vim
vim/binds.vim
vim/helpers.vim
vim/plugins.vim
vim/vimrc
# zsh
zsh/.zlogin
zsh/.zprofile
zsh/.zshenv
zsh/.zshrc
# tmux
tmux/tmux_saves
tmux/install_tmux.sh
tmux/tmux.conf

These files are empty (for the most part). You're expected to add your environment specific settings.

Create

myos create <envName>

Runs docker-compose up -d from the current directory

Connect

myos connect <envName>

Connects to a previously created MyOS environment

Restart

myos restart <envName>

Restart a previously created MyOS environment

Remove

myos remove <envName>

Remove a running MyOS environment

Features

  • Configuring locale and colors
  • Creating a non-root user and setting necessary permissions
  • Setups OpenSSH for password-less login
  • Enabling X11 Display server
  • Super light, highly optimized base Ubuntu image
  • Mechanism to "safely" run multiple processes
  • Init for running your user process as PID > 1
  • OpenSSH server out of the box
  • ZSH
  • HTop
  • Vim8 with clipboard support
  • Latest Tmux built from source
  • XAuth and XDisplay packages for clipboard support

Issues/planned changes

  • Very vim focused, would like to see if its possible to support other editors (definitely Emacs)
  • Needs CLI command that allows you to copy another users MyOS environment

Contributors

Thanks goes to these wonderful people (emoji key):

Erwan ROUSSEL
Erwan ROUSSEL

📖
Ben Yanke
Ben Yanke

💻
Marco
Marco

🐛
Aaron Tokelove
Aaron Tokelove

🐛
Ryland Goldstein
Ryland Goldstein

📆 📝

This project follows the all-contributors specification. Contributions of any kind welcome!

You can’t perform that action at this time.